diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-15 10:44:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-19 09:39:48 +0100 |
commit | 183debd7e078d2daef38170afc8542a4e625602c (patch) | |
tree | af1f24b61933b2d9da2cc7bf9e8c95405c1f812c /desktop | |
parent | 9c1383e4da135db28c422752153e9a77558e8c2f (diff) |
pretty up logging of exceptions
Add exceptionToString() and getCaughtExceptionAsString() methods in
tools.
Use the new methods in DbgUnhandledException()
Add special-case case code for most of the exceptions that contain extra
fields, so all of the relevant data ends up in the log
Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece
Reviewed-on: https://gerrit.libreoffice.org/67857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 306b219afeb6..380de3eb28cd 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -69,6 +69,7 @@ #include <com/sun/star/xml/xpath/XXPathAPI.hpp> #include <com/sun/star/deployment/XPackageManager.hpp> #include <boost/optional.hpp> +#include <tools/diagnose_ex.h> #include <algorithm> #include <memory> @@ -845,8 +846,7 @@ void BackendImpl::PackageImpl::processPackage_( } catch (const Exception &) { - SAL_WARN( "desktop", ::comphelper::anyToString( - ::cppu::getCaughtException() ) ); + SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); // ignore any errors of rollback } } @@ -933,7 +933,7 @@ OUString BackendImpl::PackageImpl::getDescription() } catch ( const css::deployment::DeploymentException& ) { - SAL_WARN( "desktop", ::comphelper::anyToString( ::cppu::getCaughtException() ) ); + SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); } } @@ -1055,8 +1055,7 @@ void BackendImpl::PackageImpl::exportTo( } // xxx todo: think about exception specs: catch (const deployment::DeploymentException &) { - SAL_WARN( "desktop", ::comphelper::anyToString( - ::cppu::getCaughtException() ) ); + SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); } catch (const lang::IllegalArgumentException & exc) { SAL_WARN( "desktop", exc ); |