diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-02-24 14:31:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-02-25 08:20:55 +0100 |
commit | 9c431f4d3afed0aad21b5ba67a5a55328c4d0685 (patch) | |
tree | 944e73da2e0cd35e9e10d3787e7c68773ffde3f8 /io | |
parent | ea25606de5f1a60430a74107b0e2e0986ac1bb15 (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'io')
-rw-r--r-- | io/Library_io.mk | 1 | ||||
-rw-r--r-- | io/source/stm/opump.cxx | 24 |
2 files changed, 13 insertions, 12 deletions
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 <sal/log.hxx> + #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/io/NotConnectedException.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> @@ -32,7 +34,7 @@ #include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include <osl/thread.h> -#include <tools/diagnose_ex.h> + 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); } } |