summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-10-07 21:09:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-10-07 22:06:28 +0200
commit29e11dd13efc2d1325b0f424788484bc8ecf0ce1 (patch)
tree9f3a5d91b615dbafd428dfc0b210ccb07e738517 /tools
parent78b1cc1a08d712212152a1e57400c8b07654e471 (diff)
Improved exception reporting.
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/diagnose_ex.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 5dd8951fd61e..ce1b5a3d8db2 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -43,6 +43,7 @@
#if OSL_DEBUG_LEVEL > 0
+ #include <com/sun/star/configuration/CorruptedConfigurationException.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
@@ -60,13 +61,13 @@
sMessage += "\nin function:"; \
sMessage += BOOST_CURRENT_FUNCTION; \
sMessage += "\ntype: "; \
- sMessage += ::rtl::OString( caught.getValueTypeName().getStr(), caught.getValueTypeName().getLength(), osl_getThreadTextEncoding() ); \
+ sMessage += ::rtl::OUStringToOString( caught.getValueTypeName(), osl_getThreadTextEncoding() ); \
::com::sun::star::uno::Exception exception; \
caught >>= exception; \
if ( exception.Message.getLength() ) \
{ \
sMessage += "\nmessage: "; \
- sMessage += ::rtl::OString( exception.Message.getStr(), exception.Message.getLength(), osl_getThreadTextEncoding() ); \
+ sMessage += ::rtl::OUStringToOString( exception.Message, osl_getThreadTextEncoding() ); \
} \
if ( exception.Context.is() ) \
{ \
@@ -74,6 +75,16 @@
sMessage += "\ncontext: "; \
sMessage += pContext; \
} \
+ { \
+ ::com::sun::star::configuration::CorruptedConfigurationException \
+ specialized; \
+ if ( caught >>= specialized ) \
+ { \
+ sMessage += "\ndetails: "; \
+ sMessage += ::rtl::OUStringToOString( \
+ specialized.Details, osl_getThreadTextEncoding() ); \
+ } \
+ } \
sMessage += "\n"; \
OSL_ENSURE( false, sMessage.getStr() )