summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-29 13:49:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-02 08:58:08 +0200
commite075ee967d0c030a22b7699ee54b5cbd49c07c17 (patch)
tree0f4dc5636aec2e8e77e84839d1ec433f11854811 /tools
parent5092305fa80f1900d7229df75a30204ecb53daf0 (diff)
give DBG_UNHANDLED_EXCEPTION_WHEN an area parameter
and rename it to DBG_UNHANDLED_EXCEPTION, to make it more like the SAL_WARN-type macros. Use some macro magic to deal with different numbers of arguments. Update the sallogareas plugin to check the area parameter of DBG_UNHANDLED_EXCEPTION. Change-Id: Ie790223244c3484f41acb3679c043fb9b438e7c4 Reviewed-on: https://gerrit.libreoffice.org/52073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/debug/debug.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 6725670f82ce..440c73418ed9 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -76,7 +76,7 @@ void DbgTestSolarMutex()
#endif
void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo,
- const char* explanatory)
+ const char* area, const char* explanatory)
{
OString sMessage( "DBG_UNHANDLED_EXCEPTION in " );
sMessage += currentFunction;
@@ -120,9 +120,12 @@ void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunc
}
sMessage += "\n";
+ if (area == nullptr)
+ area = "legacy.osl";
+
SAL_DETAIL_LOG_FORMAT(
SAL_DETAIL_ENABLE_LOG_WARN, SAL_DETAIL_LOG_LEVEL_WARN,
- "legacy.osl", fileAndLineNo, "%s", sMessage.getStr());
+ area, fileAndLineNo, "%s", sMessage.getStr());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */