summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/diagnose_ex.h4
-rw-r--r--tools/source/debug/debug.cxx7
2 files changed, 7 insertions, 4 deletions
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h
index 4c271939b643..50a400d39313 100644
--- a/include/tools/diagnose_ex.h
+++ b/include/tools/diagnose_ex.h
@@ -42,7 +42,7 @@
#include <typeinfo>
#include <tools/toolsdllapi.h>
- TOOLS_DLLPUBLIC void DbgUnhandledException(const ::com::sun::star::uno::Any& caughtException, const char* currentFunction);
+ TOOLS_DLLPUBLIC void DbgUnhandledException(const ::com::sun::star::uno::Any& caughtException, const char* currentFunction, const char* fileAndLineNo);
/** reports a caught UNO exception via OSL diagnostics
@@ -50,7 +50,7 @@
handling is not correct ....
*/
#define DBG_UNHANDLED_EXCEPTION() \
- DbgUnhandledException( ::cppu::getCaughtException(), BOOST_CURRENT_FUNCTION);
+ DbgUnhandledException( ::cppu::getCaughtException(), BOOST_CURRENT_FUNCTION, SAL_DETAIL_WHERE);
#else // OSL_DEBUG_LEVEL
#define DBG_UNHANDLED_EXCEPTION()
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 3f950ca8dd54..49da3089805f 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -1589,7 +1589,7 @@ void DbgOutf( const sal_Char*, ... ) {}
#if OSL_DEBUG_LEVEL > 0
-TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction)
+TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo)
{
OString sMessage( "caught an exception!" );
sMessage += "\nin function:";
@@ -1628,7 +1628,10 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any & caught, const c
}
}
sMessage += "\n";
- OSL_ENSURE( false, sMessage.getStr() );
+
+ SAL_DETAIL_LOG_FORMAT(
+ SAL_DETAIL_ENABLE_LOG_WARN, SAL_DETAIL_LOG_LEVEL_WARN,
+ "legacy.osl", fileAndLineNo, "%s", sMessage.getStr());
}
#endif // OSL_DEBUG_LEVEL