summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 10:44:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-19 09:39:48 +0100
commit183debd7e078d2daef38170afc8542a4e625602c (patch)
treeaf1f24b61933b2d9da2cc7bf9e8c95405c1f812c /writerfilter
parent9c1383e4da135db28c422752153e9a77558e8c2f (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 5ffad7b17527..88d70d2132c2 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;
@@ -211,7 +212,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 0e01c2e5872e..c19f566ad286 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 (...)