diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-15 10:44:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-19 09:39:48 +0100 |
commit | 183debd7e078d2daef38170afc8542a4e625602c (patch) | |
tree | af1f24b61933b2d9da2cc7bf9e8c95405c1f812c /svx | |
parent | 9c1383e4da135db28c422752153e9a77558e8c2f (diff) |
pretty up logging of exceptions
Add exceptionToString() and getCaughtExceptionAsString() methods in
tools.
Use the new methods in DbgUnhandledException()
Add special-case case code for most of the exceptions that contain extra
fields, so all of the relevant data ends up in the log
Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece
Reviewed-on: https://gerrit.libreoffice.org/67857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 754681fca0ad..68c972bc42a1 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -54,6 +54,7 @@ #include <comphelper/anytostring.hxx> #include <svx/svdpagv.hxx> #include <tools/globname.hxx> +#include <tools/diagnose_ex.h> #include <vcl/jobset.hxx> #include <comphelper/classids.hxx> @@ -866,8 +867,8 @@ bool SdrOle2Obj::UpdateLinkURL_Impl() } catch( css::uno::Exception const & ) { - SAL_WARN( "svx", "SdrOle2Obj::UpdateLinkURL_Impl(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::UpdateLinkURL_Impl(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } } @@ -900,8 +901,8 @@ void SdrOle2Obj::BreakFileLink_Impl() } catch( css::uno::Exception& ) { - SAL_WARN( "svx", "SdrOle2Obj::BreakFileLink_Impl(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::BreakFileLink_Impl(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } } } @@ -1017,8 +1018,8 @@ void SdrOle2Obj::Connect_Impl() } catch( css::uno::Exception& ) { - SAL_WARN( "svx", "SdrOle2Obj::Connect_Impl(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::Connect_Impl(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } } } @@ -1081,8 +1082,8 @@ void SdrOle2Obj::RemoveListeners_Impl() } catch( css::uno::Exception& ) { - SAL_WARN( "svx", "SdrOle2Obj::RemoveListeners_Impl(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::RemoveListeners_Impl(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } } } @@ -1159,8 +1160,8 @@ void SdrOle2Obj::Disconnect_Impl() } catch( css::uno::Exception& ) { - SAL_WARN( "svx", "SdrOle2Obj::Disconnect_Impl(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::Disconnect_Impl(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } mpImpl->mbConnected = false; @@ -1740,8 +1741,8 @@ bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, s } catch( css::uno::Exception& ) { - SAL_WARN( "svx", "SdrOle2Obj::Unload=(), exception caught: " - << comphelper::anyToString( cppu::getCaughtException() ) ); + SAL_WARN( "svx", "SdrOle2Obj::Unload=(), exception: " + << exceptionToString( cppu::getCaughtException() ) ); } } |