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 /sfx2/source/appl/newhelp.cxx | |
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 'sfx2/source/appl/newhelp.cxx')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index d4e774b1f775..1e643918361e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -33,6 +33,7 @@ #include <sal/log.hxx> #include <osl/diagnose.h> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> #include <sfx2/strings.hrc> #include <helpids.h> @@ -2030,9 +2031,10 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox() Any aAny = ConfigurationHelper::readRelativeKey( xConfiguration, sPath, KEY_UI_NAME ); aAny >>= sTemp; } - catch( Exception& ) + catch( Exception const & ) { - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception " << exceptionToString(ex) ); } sModuleName = sTemp; } @@ -2283,9 +2285,10 @@ IMPL_LINK( SfxHelpTextWindow_Impl, CheckHdl, Button*, pButton, void ) xConfiguration, PATH_OFFICE_FACTORIES + sCurrentFactory, KEY_HELP_ON_OPEN, makeAny( bChecked ) ); ConfigurationHelper::flush( xConfiguration ); } - catch( Exception& ) + catch( Exception const & ) { - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception " << exceptionToString(ex) ); } } @@ -2439,9 +2442,10 @@ void SfxHelpTextWindow_Impl::GetFocus() xWindow->setFocus(); } } - catch( Exception& ) + catch( Exception const & ) { - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception " << exceptionToString(ex) ); } } @@ -2526,9 +2530,10 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const } } } - catch( Exception& ) + catch( Exception const & ) { - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception " << exceptionToString(ex) ); } SAL_WARN_IF( !bSetOff, "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" ); @@ -3098,9 +3103,10 @@ void SfxHelpWindow_Impl::CloseWindow() xCloser->close( false ); } } - catch( Exception& ) + catch( Exception const & ) { - SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception" ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception " << exceptionToString(ex) ); } } |