summaryrefslogtreecommitdiff
path: root/writerfilter
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 /writerfilter
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 'writerfilter')
-rw-r--r--writerfilter/source/filter/WriterFilter.cxx3
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index 08bc0c420ec7..c23e96186921 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -43,6 +43,7 @@
#include <unotools/mediadescriptor.hxx>
#include <rtl/ref.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -206,7 +207,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& rDesc
catch (uno::Exception const&)
{
css::uno::Any anyEx = cppu::getCaughtException();
- SAL_WARN("writerfilter", "WriterFilter::filter(): failed with " << anyEx);
+ SAL_WARN("writerfilter", "WriterFilter::filter(): failed with " << exceptionToString(anyEx));
throw lang::WrappedTargetRuntimeException("",
static_cast<OWeakObject*>(this), anyEx);
}
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 8f0ad98c9702..7b0148edc4c9 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -34,6 +34,7 @@
#include "OOXMLPropertySet.hxx"
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -519,7 +520,7 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
catch (uno::Exception const&)
{
css::uno::Any anyEx = cppu::getCaughtException();
- SAL_WARN("writerfilter.ooxml", "OOXMLDocumentImpl::resolve(): " << anyEx);
+ SAL_WARN("writerfilter.ooxml", "OOXMLDocumentImpl::resolve(): " << exceptionToString(anyEx));
throw lang::WrappedTargetRuntimeException("", nullptr, anyEx);
}
catch (...)