diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-25 20:03:29 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-25 20:04:40 +0100 |
commit | 1700c767e7bfcc7193d878ac53c21e1b59354973 (patch) | |
tree | 94477df129e4035edbef480a8eaa45dbfc8f1f2a /xmloff | |
parent | 6fee9755f6ec6f61c024af193adfc09eac6fd03e (diff) |
add exception context to error log message
Change-Id: Iae8a0c8e7ed4c8bec6497f1636a943bd6f79d5c8
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index aced8d37b245..b1ca265b77b6 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -844,9 +844,14 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue // We must catch exceptions, because according to the // API definition export must not throw one! css::uno::Any ex(cppu::getCaughtException()); + OUString sMessage( ex.getValueTypeName() + ": \"" + e.Message + "\""); + if (e.Context.is()) + { + const char* pContext = typeid(*e.Context.get()).name(); + sMessage += " (context: " + OUString::createFromAscii(pContext) + " )"; + } SetError( XMLERROR_FLAG_ERROR | XMLERROR_FLAG_SEVERE | XMLERROR_API, - Sequence<OUString>(), - ex.getValueTypeName() + ": \"" + e.Message + "\"", nullptr ); + Sequence<OUString>(), sMessage, nullptr ); } // return true only if no error occurred |