diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-09-12 10:37:31 +0100 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-09-12 17:26:27 +0000 |
commit | 3f31bdd67a82056b87b8b93e54a953983ba048bc (patch) | |
tree | f205856844b938a594ee8615024920ee97bc55e5 /mysqlc | |
parent | 42165189826367937737861116e969a22e9db787 (diff) |
Update mysqlc's ColumnLocate::findColumn to throw for invalid column.
(This is to comply with the updated API specification.)
Change-Id: I4542fecc78a6e64011276dafc72c31d5533af1ab
Reviewed-on: https://gerrit.libreoffice.org/5923
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'mysqlc')
-rw-r--r-- | mysqlc/source/mysqlc_resultset.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index b2793adff6c8..d9160ff253bc 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -179,7 +179,13 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName) } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding); } - return 0; + throw SQLException( + "The column name '" + columnName + "' is not valid.", + *this, + OUString("42S22"), + 0, + Any() + ); } /* }}} */ |