From 9c431f4d3afed0aad21b5ba67a5a55328c4d0685 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 24 Feb 2022 14:31:23 +0100 Subject: Don't use Library_tl in URE libraries This partly reverts 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 "log nice exception messages whereever possible", e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1 "loplugin:logexceptionnicely in starmath..svgio", d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 "OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION", and 877f40ac3f2add2b6dc37bae280d4d98dd102286 "tdf#42949 Fix new IWYU warnings in directories [h-r]*", and adapts loplugin:logexceptionnicely accordingly. Change-Id: I792b853b988c7c5f77179ca0672c30cb4223b5a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- io/Library_io.mk | 1 - io/source/stm/opump.cxx | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'io') diff --git a/io/Library_io.mk b/io/Library_io.mk index a22a522f7bbc..6c70822eece1 100644 --- a/io/Library_io.mk +++ b/io/Library_io.mk @@ -18,7 +18,6 @@ $(eval $(call gb_Library_use_libraries,io,\ cppu \ cppuhelper \ sal \ - tl \ )) $(eval $(call gb_Library_set_componentfile,io,io/source/io,ure/services)) diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index c6cb22cb4816..97f254b6be2a 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -18,6 +18,8 @@ */ +#include + #include #include #include @@ -32,7 +34,7 @@ #include #include #include -#include + using namespace osl; using namespace cppu; @@ -123,9 +125,9 @@ void Pump::fireError( const Any & exception ) { static_cast< XStreamListener * > ( iter.next() )->error( exception ); } - catch ( const RuntimeException & ) + catch ( const RuntimeException &e ) { - TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners"); + SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e); } } } @@ -152,9 +154,9 @@ void Pump::fireClose() { static_cast< XStreamListener * > ( iter.next() )->closed( ); } - catch ( const RuntimeException & ) + catch ( const RuntimeException &e ) { - TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners"); + SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e); } } } @@ -168,9 +170,9 @@ void Pump::fireStarted() { static_cast< XStreamListener * > ( iter.next() )->started( ); } - catch ( const RuntimeException & ) + catch ( const RuntimeException &e ) { - TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners"); + SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e); } } } @@ -184,9 +186,9 @@ void Pump::fireTerminated() { static_cast< XStreamListener * > ( iter.next() )->terminated(); } - catch ( const RuntimeException & ) + catch ( const RuntimeException &e ) { - TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners"); + SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e); } } } @@ -284,11 +286,11 @@ void Pump::run() close(); fireClose(); } - catch ( const css::uno::Exception & ) + catch ( const css::uno::Exception &e ) { // we are the last on the stack. // this is to avoid crashing the program, when e.g. a bridge crashes - TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners"); + SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e); } } -- cgit