diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-26 15:44:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-26 20:49:22 +0200 |
commit | e5356fb099d5fe0d476fa99697e4a7e04688f9ee (patch) | |
tree | 8e551a762d03451896315507b68d72551c1bc6b6 /include/tools | |
parent | d84e590486e2c26212931de80a84181d7aca7bbe (diff) |
[API CHANGE] Drop OSL_THIS_FUNC, directly use C++11 __func__
It had been documented as "the macro OSL_THIS_FUNC is intended to be an office
internal macro for now", so take the liberty of removing it, even if technically
that can be considered an incompatible API change.
Change-Id: I7580a932e1da54845934378a650e894f3f3a9062
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101406
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/diagnose_ex.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h index 7d266464b1db..a09c64ae6c19 100644 --- a/include/tools/diagnose_ex.h +++ b/include/tools/diagnose_ex.h @@ -58,11 +58,11 @@ inline css::uno::Any DbgGetCaughtException() This takes two optional parameters: area and explanatory */ #define DBG_UNHANDLED_EXCEPTION_0_ARGS() \ - DbgUnhandledException( DbgGetCaughtException(), OSL_THIS_FUNC, SAL_DETAIL_WHERE ); + DbgUnhandledException( DbgGetCaughtException(), __func__, SAL_DETAIL_WHERE ); #define DBG_UNHANDLED_EXCEPTION_1_ARGS(area) \ - DbgUnhandledException( DbgGetCaughtException(), OSL_THIS_FUNC, SAL_DETAIL_WHERE, area ); + DbgUnhandledException( DbgGetCaughtException(), __func__, SAL_DETAIL_WHERE, area ); #define DBG_UNHANDLED_EXCEPTION_2_ARGS(area, explanatory) \ - DbgUnhandledException( DbgGetCaughtException(), OSL_THIS_FUNC, SAL_DETAIL_WHERE, area, explanatory ); + DbgUnhandledException( DbgGetCaughtException(), __func__, SAL_DETAIL_WHERE, area, explanatory ); #define DBG_UNHANDLED_FUNC_CHOOSER(_f1, _f2, _f3, ...) _f3 #define DBG_UNHANDLED_FUNC_RECOMPOSER(argsWithParentheses) DBG_UNHANDLED_FUNC_CHOOSER argsWithParentheses @@ -78,14 +78,14 @@ inline css::uno::Any DbgGetCaughtException() #define ENSURE_ARG_OR_THROW(c, m) if( !(c) ) { \ OSL_ENSURE(c, m); \ throw css::lang::IllegalArgumentException( \ - OUStringLiteral(OSL_THIS_FUNC) \ + OUStringLiteral(__func__) \ + ",\n" m, \ css::uno::Reference< css::uno::XInterface >(), \ 0 ); } #define ENSURE_ARG_OR_THROW2(c, m, ifc, arg) if( !(c) ) { \ OSL_ENSURE(c, m); \ throw css::lang::IllegalArgumentException( \ - OUStringLiteral(OSL_THIS_FUNC) \ + OUStringLiteral(__func__) \ + ",\n" m, \ ifc, \ arg ); } @@ -97,14 +97,14 @@ inline css::uno::Any DbgGetCaughtException() if( !(c) ){ \ OSL_ENSURE(c, m); \ throw css::uno::RuntimeException( \ - OUStringLiteral(OSL_THIS_FUNC) + ",\n" m, \ + OUStringLiteral(__func__) + ",\n" m, \ css::uno::Reference< css::uno::XInterface >() ); } #define ENSURE_OR_THROW2(c, m, ifc) \ if( !(c) ) { \ OSL_ENSURE(c, m); \ throw css::uno::RuntimeException( \ - OUStringLiteral(OSL_THIS_FUNC) + ",\n" m, \ + OUStringLiteral(__func__) + ",\n" m, \ ifc ); } /** This macro asserts the given condition (in debug mode), and |