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 --- sd/source/ui/unoidl/DrawController.cxx | 6 ++++-- sd/source/ui/unoidl/unomodel.cxx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sd/source/ui/unoidl') diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 2085e77b2d74..1acea57a3cb3 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -425,9 +426,10 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw() mpCurrentPage.reset(pNewCurrentPage); } - catch (const uno::Exception& e) + catch (const uno::Exception&) { - SAL_WARN("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage(), exception caught: " << e); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage(), exception caught: " << exceptionToString(ex)); } } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ca453c80d2b5..41cd4ad24a27 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -125,6 +125,7 @@ #include #include +#include #define TWIPS_PER_PIXEL 15 @@ -326,9 +327,10 @@ void SAL_CALL SdXImpressDocument::release() throw ( ) { dispose(); } - catch (const uno::RuntimeException& exc) + catch (const uno::RuntimeException&) { // don't break throw () - SAL_WARN( "sd", exc ); + css::uno::Any ex( cppu::getCaughtException() ); + SAL_WARN( "sd", exceptionToString(ex) ); } } SfxBaseModel::release(); -- cgit