diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-10 10:46:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-10 13:50:51 +0100 |
commit | 1041dc7d41e848e1690c67009a5add2eeeaf698b (patch) | |
tree | a1dbf9d46b73025d82c794ce1c3a8a08fb625689 /comphelper/source/misc | |
parent | 8d973c5b9405bfa6964d3dfebd0017fd60ec3eca (diff) |
reduce noise in exceptionToStringImpl
otherwise we end up with log messages like
wrapped: void message: "at
C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/comphelper/source/misc/diagnose_ex.cxx:66"
when we call ourself to print out sub-exceptions
Change-Id: I9e598a6b68469e9baa3232811f310b7e24f1b77e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r-- | comphelper/source/misc/diagnose_ex.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/comphelper/source/misc/diagnose_ex.cxx b/comphelper/source/misc/diagnose_ex.cxx index e805c5b4c2a5..ec00bd0e1436 100644 --- a/comphelper/source/misc/diagnose_ex.cxx +++ b/comphelper/source/misc/diagnose_ex.cxx @@ -62,6 +62,9 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any & auto toOString = [](OUString const & s) { return OUStringToOString( s, osl_getThreadTextEncoding() ); }; + // when called recursively, we might not have any exception to print + if (!caught.hasValue()) + return; sMessage.append(toOString(caught.getValueTypeName())); css::uno::Exception exception; caught >>= exception; |