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 --- linguistic/source/convdiclist.cxx | 4 +++- linguistic/source/gciterator.cxx | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'linguistic/source') diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index c34d97adf07e..50f1799423d2 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include "convdic.hxx" #include "convdiclist.hxx" @@ -271,7 +272,8 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName ) } catch( ... ) { - SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): Any other exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): Any other exception " << exceptionToString(ex) ); } } diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 5d27876d6d57..325af32849bd 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -936,10 +937,11 @@ void SAL_CALL GrammarCheckingIterator::processLinguServiceEvent( { throw; } - catch (const ::uno::Exception &rE) + catch (const ::uno::Exception &) { + css::uno::Any ex( cppu::getCaughtException() ); // ignore - SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << rE); + SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << exceptionToString(ex)); } } } @@ -1099,9 +1101,10 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl() } } } - catch (uno::Exception &) + catch (uno::Exception const &) { - SAL_WARN( "linguistic", "exception caught. Failed to get configured services" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "linguistic", "exception caught. Failed to get configured services " << exceptionToString(ex) ); } { -- cgit