diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-01 14:42:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-07 07:12:39 +0100 |
commit | 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 (patch) | |
tree | d41feeea533127280e0503d0dc2dd55a4ab83ce8 /dbaccess | |
parent | 4f810905fa74128871f2fe924a3d28a79f4e4261 (diff) |
log nice exception messages whereever possible
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1
Reviewed-on: https://gerrit.libreoffice.org/68579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 5 |
4 files changed, 12 insertions, 6 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 5cff9d646dfb..ceb274021843 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1472,9 +1472,10 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl { throw; } - catch(Exception&) + catch(Exception const &) { - SAL_WARN("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!"); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters! " << exceptionToString(ex)); } // we're done with the parameters, now for the real execution diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 37cec2057799..ad3713a1f43e 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1671,9 +1671,10 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r { xProp->setPropertyValue("Version" , uno::makeAny(aVersion)); } - catch (const uno::Exception& e) + catch (const uno::Exception&) { - SAL_WARN("dbaccess", "exception setting Version: " << e); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("dbaccess", "exception setting Version: " << exceptionToString(ex)); } } diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index ead7061ab4b8..f6a3decb4db1 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -691,7 +691,8 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString } catch( const Exception& ) { - SAL_WARN("dbaccess", "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("dbaccess", "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error! " << exceptionToString(ex) ); } if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) ) { diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 25049a904e08..47e5c9933a4b 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -203,7 +203,10 @@ SQLExceptionInfo createConnection( const Reference< css::beans::XPropertySet>& catch(const SQLContext& e) { aInfo = SQLExceptionInfo(e); } catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); } catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); } - catch(const Exception&) { SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); } + catch(const Exception&) { + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception! " << exceptionToString(ex)); + } return aInfo; } |