Improve DBG_UNHANDLED_EXCEPTION output a bit
For example, in de3898aecb
"Add missing test
dependency" it would have output
> warn:svx:680849:680849:svx/source/unodraw/unoshape.cxx:1779: DBG_UNHANDLED_EXCEPTION in setPropertyValues exception: com.sun.star.beans.UnknownPropertyException message: "URL at svx/source/unodraw/unoshape.cxx:1600"
rather than
> warn:svx:680849:680849:svx/source/unodraw/unoshape.cxx:1779: DBG_UNHANDLED_EXCEPTION in setPropertyValues exception: com.sun.star.beans.UnknownPropertyException message: URL svx/source/unodraw/unoshape.cxx:1600
making it slightly clearer that what follows "URL" is not the value of that URL
but rather the source location where the exception was thrown.
Change-Id: Ia3abd232fce3d95a8b66ff4ed5bab2fcc248df2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128788
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -2871,7 +2871,7 @@ void ExceptionType::dumpHppFile(
|
||||
out << "\n#if defined LIBO_USE_SOURCE_LOCATION\n";
|
||||
out << " if (!Message.isEmpty())\n";
|
||||
out << " Message += \" \";\n";
|
||||
out << " Message += o3tl::runtimeToOUString(location.file_name()) + \":\" + OUString::number(location.line());\n";
|
||||
out << " Message += \"at \" + o3tl::runtimeToOUString(location.file_name()) + \":\" + OUString::number(location.line());\n";
|
||||
out << "#endif\n";
|
||||
}
|
||||
out << "}\n\n";
|
||||
@@ -2924,7 +2924,7 @@ void ExceptionType::dumpHppFile(
|
||||
out << "\n#if defined LIBO_USE_SOURCE_LOCATION\n";
|
||||
out << " if (!Message.isEmpty())\n";
|
||||
out << " Message += \" \";\n";
|
||||
out << " Message += o3tl::runtimeToOUString(location.file_name()) + \":\" + OUString::number(location.line());\n";
|
||||
out << " Message += \"at \" + o3tl::runtimeToOUString(location.file_name()) + \":\" + OUString::number(location.line());\n";
|
||||
out << "#endif\n";
|
||||
}
|
||||
out << "}\n\n";
|
||||
|
@@ -105,8 +105,9 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
|
||||
caught >>= exception;
|
||||
if ( !exception.Message.isEmpty() )
|
||||
{
|
||||
sMessage.append(" message: ");
|
||||
sMessage.append(" message: \"");
|
||||
sMessage.append(toOString(exception.Message));
|
||||
sMessage.append("\"");
|
||||
}
|
||||
/* TODO FIXME (see https://gerrit.libreoffice.org/#/c/83245/)
|
||||
if ( exception.Context.is() )
|
||||
|
Reference in New Issue
Block a user