From e075ee967d0c030a22b7699ee54b5cbd49c07c17 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Mar 2018 13:49:19 +0200 Subject: 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 Reviewed-by: Noel Grandin --- tools/source/debug/debug.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools/source/debug/debug.cxx') 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: */ -- cgit