diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-01 14:42:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-07 07:12:39 +0100 |
commit | 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 (patch) | |
tree | d41feeea533127280e0503d0dc2dd55a4ab83ce8 /include/toolkit | |
parent | 4f810905fa74128871f2fe924a3d28a79f4e4261 (diff) |
log nice exception messages whereever possible
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1
Reviewed-on: https://gerrit.libreoffice.org/68579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/toolkit')
-rw-r--r-- | include/toolkit/helper/macros.hxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx index d06988b18fde..cf50d53c15be 100644 --- a/include/toolkit/helper/macros.hxx +++ b/include/toolkit/helper/macros.hxx @@ -103,10 +103,11 @@ void ClassName::disposing( const css::lang::EventObject& ) \ #if OSL_DEBUG_LEVEL > 0 - #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ - SAL_WARN( "toolkit", #ClassName "::" #MethodName ": caught an exception! " << e); + #define DISPLAY_EXCEPTION( ClassName, MethodName ) \ + css::uno::Any ex( cppu::getCaughtException() ); \ + SAL_WARN( "toolkit", #ClassName "::" #MethodName ": caught an exception! " << exceptionToString(ex)); #else - #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e; + #define DISPLAY_EXCEPTION( ClassName, MethodName ) #endif #define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( ClassName, InterfaceName, MethodName, ParamType1 ) \ @@ -127,9 +128,9 @@ void ClassName::disposing( const css::lang::EventObject& ) \ if ( e.Context == xListener || !e.Context.is() ) \ aIt.remove(); \ } \ - catch(const css::uno::RuntimeException& e) \ + catch(const css::uno::RuntimeException&) \ { \ - DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ + DISPLAY_EXCEPTION( ClassName, MethodName ) \ } \ } \ } @@ -153,9 +154,9 @@ void ClassName::disposing( const css::lang::EventObject& ) \ if ( e.Context == xListener || !e.Context.is() ) \ aIt.remove(); \ } \ - catch(const css::uno::RuntimeException& e) \ + catch(const css::uno::RuntimeException&) \ { \ - DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ + DISPLAY_EXCEPTION( ClassName, MethodName ) \ } \ } \ } |