fix file and lineno info for DBG_UNHANDLED_EXCEPTION
which I broke in commit 863d38fbfa4fb4861e476828c46410602100919e "move DBG_UNHANDLED_EXCEPTION out of line" Change-Id: Ic30e985cc356d81013ced1ce74ec6c78469d9882
This commit is contained in:
parent
177f01b9fe
commit
2cb247a12d
@ -42,7 +42,7 @@
|
|||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <tools/toolsdllapi.h>
|
#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
|
/** reports a caught UNO exception via OSL diagnostics
|
||||||
|
|
||||||
@ -50,7 +50,7 @@
|
|||||||
handling is not correct ....
|
handling is not correct ....
|
||||||
*/
|
*/
|
||||||
#define DBG_UNHANDLED_EXCEPTION() \
|
#define DBG_UNHANDLED_EXCEPTION() \
|
||||||
DbgUnhandledException( ::cppu::getCaughtException(), BOOST_CURRENT_FUNCTION);
|
DbgUnhandledException( ::cppu::getCaughtException(), BOOST_CURRENT_FUNCTION, SAL_DETAIL_WHERE);
|
||||||
|
|
||||||
#else // OSL_DEBUG_LEVEL
|
#else // OSL_DEBUG_LEVEL
|
||||||
#define DBG_UNHANDLED_EXCEPTION()
|
#define DBG_UNHANDLED_EXCEPTION()
|
||||||
|
@ -1589,7 +1589,7 @@ void DbgOutf( const sal_Char*, ... ) {}
|
|||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 0
|
#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!" );
|
OString sMessage( "caught an exception!" );
|
||||||
sMessage += "\nin function:";
|
sMessage += "\nin function:";
|
||||||
@ -1628,7 +1628,10 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any & caught, const c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sMessage += "\n";
|
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
|
#endif // OSL_DEBUG_LEVEL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user