summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-13 10:30:00 +0200
committerNoel Grandin <noel@peralex.com>2016-06-13 10:30:28 +0200
commit27ecc40785b103297f0725928af1d98ffb856dc3 (patch)
treeca29eaaa45dc5ba3d6546d57ff954283c4afafd4 /tools
parent9f4e283fc8af97c4599e21006ad73b73fc141f81 (diff)
improve formatting of DBG_UNHANDLED_EXCEPTION message
put more useful info on the same line, and indent following lines, to visually separate them from new log messages. Change-Id: Ieda71aebf68420a0521ce98c621b0236d533bc53
Diffstat (limited to 'tools')
-rw-r--r--tools/source/debug/debug.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index dafd60a74d59..1f67a6fa946c 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -78,22 +78,21 @@ void DbgTestSolarMutex()
void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo)
{
- OString sMessage( "caught an exception!" );
- sMessage += "\nin function:";
+ OString sMessage( "DBG_UNHANDLED_EXCEPTION in " );
sMessage += currentFunction;
- sMessage += "\ntype: ";
+ sMessage += "\n type: ";
sMessage += OUStringToOString( caught.getValueTypeName(), osl_getThreadTextEncoding() );
css::uno::Exception exception;
caught >>= exception;
if ( !exception.Message.isEmpty() )
{
- sMessage += "\nmessage: ";
+ sMessage += "\n message: ";
sMessage += OUStringToOString( exception.Message, osl_getThreadTextEncoding() );
}
if ( exception.Context.is() )
{
const char* pContext = typeid( *exception.Context.get() ).name();
- sMessage += "\ncontext: ";
+ sMessage += "\n context: ";
sMessage += pContext;
}
{
@@ -101,7 +100,7 @@ void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunc
specialized;
if ( caught >>= specialized )
{
- sMessage += "\ndetails: ";
+ sMessage += "\n details: ";
sMessage += OUStringToOString(
specialized.Details, osl_getThreadTextEncoding() );
}
@@ -110,7 +109,7 @@ void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunc
css::task::ErrorCodeIOException specialized;
if ( caught >>= specialized )
{
- sMessage += "\ndetails: ";
+ sMessage += "\n details: ";
sMessage += OString::number( specialized.ErrCode );
}
}