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 --- basic/source/classes/sbxmod.cxx | 4 +++- basic/source/runtime/runtime.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 23a279485afa..7e65e2e588a2 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -145,7 +146,8 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ) } catch(const Exception& ) { - SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception!" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception! " << exceptionToString(ex) ); } } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index ea0d9ae69379..0e1ace2e349b 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -343,7 +344,8 @@ SbiInstance::~SbiInstance() } catch( const Exception& ) { - SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components!" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components! " << exceptionToString(ex) ); } } -- cgit