summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 10:44:08 +0200
committerMichael Meeks <michael.meeks@collabora.com>2019-08-05 21:06:51 -0400
commit90258c5001c862cfd03f829d4aab2feac240eef6 (patch)
tree0abc1781eeca085a7eae5b9aa0cf0a41bcd8f6e8 /oox
parent985223a77d078412e5caacfc2fc06da65d821da4 (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 'oox')
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx5
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 13bba2da95a3..93c082f42002 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -23,6 +23,7 @@
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <tools/multisel.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPages.hpp>
@@ -452,7 +453,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
catch( uno::Exception& )
{
SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::EndDocument(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
}
}
@@ -503,7 +504,7 @@ void PresentationFragmentHandler::finalizeImport()
catch( uno::Exception& )
{
SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::finalizeImport(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
}
// todo error handling;
if ( rxStatusIndicator.is() )
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index b12298829052..1c3b58be6274 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <oox/helper/attributelist.hxx>
#include <oox/helper/propertyset.hxx>
@@ -251,7 +252,7 @@ void SlideFragmentHandler::finalizeImport()
catch( uno::Exception& )
{
SAL_WARN( "oox", "oox::ppt::SlideFragmentHandler::EndElement(), "
- "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
+ "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
}
}