comphelper/source/misc/logging.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit fecfdf01505cd1326a864c27f61a535921d2fe30
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Aug 19 08:08:57 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Aug 19 09:28:51 2022 +0200

    Some more use of TOOLS_WARN_EXCEPTION
    
    CppunitTest_dbaccess_tdf126268 had oddly failed once for me with
    
    > [_RUN_____] Tdf126268Test::testNumbers
    > Fontconfig error: Cannot load default config file: No such file: (null)
    > 
warn:legacy.osl:4121315:4121315:dbaccess/source/core/dataaccess/ModelImpl.cxx:765:
 ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage 
from!
    > 
warn:legacy.osl:4121315:4121315:dbaccess/source/core/dataaccess/ModelImpl.cxx:765:
 ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage 
from!
    > 
warn:legacy.osl:4121315:4121315:dbaccess/source/core/dataaccess/ModelImpl.cxx:765:
 ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage 
from!
    > warn:legacy.osl:4121315:4121315:comphelper/source/misc/logging.cxx:63: 
EventLogger_Impl::impl_createLogger_nothrow: caught an exception!
    >
    >
    > Fatal exception: Signal 6
    > Stack:
    > 
workdir/LinkTarget/Executable/cppunittester(__interceptor_backtrace+0x5b)[0x5589724dcd5b]
    > instdir/program/libuno_sal.so.3(+0x62188d)[0x7fb0bba3888d]
    > instdir/program/libuno_sal.so.3(+0x6210a9)[0x7fb0bba380a9]
    > instdir/program/libuno_sal.so.3(+0x61eba6)[0x7fb0bba35ba6]
    > /lib64/libc.so.6(+0x3ea70)[0x7fb0baefea70]
    > /lib64/libc.so.6(+0x8ec4c)[0x7fb0baf4ec4c]
    > /lib64/libc.so.6(raise+0x16)[0x7fb0baefe9c6]
    > /lib64/libc.so.6(abort+0xcf)[0x7fb0baee87f4]
    > instdir/program/libEngine12.so(+0x3075ac9)[0x7fb029552ac9]
    > instdir/program/libEngine12.so(+0x3075c32)[0x7fb029552c32]
    > instdir/program/libEngine12.so(+0x318e53c)[0x7fb02966b53c]
    [...]
    
    and it might have been interesting to learn what that caught exception was.
    
    Change-Id: I3597ed22b4f02a8fa08f1cd36aa64d210e48356d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138509
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/comphelper/source/misc/logging.cxx 
b/comphelper/source/misc/logging.cxx
index b656389def83..3bce820a82ac 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -22,6 +22,7 @@
 
 #include <com/sun/star/logging/LoggerPool.hpp>
 
+#include <comphelper/diagnose_ex.hxx>
 #include <osl/diagnose.h>
 
 
@@ -60,7 +61,8 @@ namespace comphelper
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EventLogger_Impl::impl_createLogger_nothrow: caught an 
exception!" );
+            TOOLS_WARN_EXCEPTION(
+                "comphelper", "EventLogger_Impl::impl_createLogger_nothrow: 
caught an exception!" );
         }
     }
 
@@ -80,7 +82,7 @@ namespace comphelper
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EventLogger::isLoggable: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "comphelper", "EventLogger::isLoggable: 
caught an exception!" );
         }
 
         return false;
@@ -151,7 +153,7 @@ namespace comphelper
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EventLogger::impl_log: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "comphelper", "EventLogger::impl_log: caught 
an exception!" );
         }
     }
 } // namespace comphelper

Reply via email to