From 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 1 Mar 2019 14:42:38 +0200 Subject: log nice exception messages whereever possible Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/minimizer/configurationaccess.cxx | 6 ++++-- sdext/source/presenter/PresenterConfigurationAccess.cxx | 5 +++-- sdext/source/presenter/PresenterTextView.cxx | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index f0e16bd12461..a711610bc0aa 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -28,6 +28,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -328,10 +329,11 @@ Reference< XInterface > ConfigurationAccess::GetConfigurationNode( } } } - catch (const Exception& rException) + catch (const Exception&) { + css::uno::Any ex( cppu::getCaughtException() ); SAL_WARN("sdext.minimizer", "caught exception while getting configuration node " - << sPathToNode << " : " << rException); + << sPathToNode << " : " << exceptionToString(ex)); } return xNode; } diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index f2c5569a4dec..58fc6a6d058f 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -149,9 +149,10 @@ Any PresenterConfigurationAccess::GetConfigurationNode ( return rxNode->getByHierarchicalName(sPathToNode); } } - catch (const Exception& rException) + catch (const Exception&) { - SAL_WARN("sdext.presenter", "caught exception while getting configuration node " << sPathToNode << " : " << rException); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("sdext.presenter", "caught exception while getting configuration node " << sPathToNode << " : " << exceptionToString(ex)); } return Any(); diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index eb995dd935b3..59350c34f3fa 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -39,6 +39,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; @@ -1061,7 +1062,8 @@ PresenterTextCaret::~PresenterTextCaret() } catch (uno::Exception const&) { - SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret"); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret " << exceptionToString(ex)); } } -- cgit