diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-08-13 14:01:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-13 20:31:37 +0200 |
commit | 92a9411040410a16532177d5dde8ca8968bcc12b (patch) | |
tree | 88ec6756e4004d41ac772230797cf40dbb9b1a77 | |
parent | 3f72879a8e54e18f3ad587f7284b84db592c8d1a (diff) |
log details of exception when we catch std::exception
Change-Id: Ibfaba3473b11e24381d5a71a722c021ecde3488b
Reviewed-on: https://gerrit.libreoffice.org/41112
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | avmedia/source/framework/modeltools.cxx | 5 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/orcus/xmlcontext.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/sidebar/DocumentHelper.cxx | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx index 03d4647849de..729d19298446 100644 --- a/avmedia/source/framework/modeltools.cxx +++ b/avmedia/source/framework/modeltools.cxx @@ -26,6 +26,7 @@ #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <boost/optional.hpp> +#include <boost/exception/diagnostic_information.hpp> #include <config_features.h> @@ -206,9 +207,9 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference< // Write out modified json json_parser::write_json( sUrl, aTree ); } - catch ( boost::exception const& ) + catch ( boost::exception const& e ) { - SAL_WARN("avmedia.opengl", "Exception while parsing *.json file"); + SAL_WARN("avmedia.opengl", "Exception while parsing *.json file " << boost::diagnostic_information(e)); return; } diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 8649bd121b89..0c5e26398d9e 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -24,6 +24,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <iostream> #include "sal/main.h" #include "sal/types.h" #include "osl/thread.h" @@ -101,9 +102,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) OString sPaths = getLD_LIBRARY_PATH(aInfo->arVendorData); fprintf(stdout, "%s\n", sPaths.getStr()); } - catch (const std::exception&) + catch (const std::exception& e) { - fprintf(stderr,"javaldx failed!\n"); + std::cerr << "javaldx failed! " << e.what() << std::endl; return -1; } diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index a84b9b2c0c4d..f01d4434778b 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -211,9 +211,9 @@ void ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM { SAL_WARN("sc.orcus", "Malformed XML error: " << e.what()); } - catch (const std::exception&) + catch (const std::exception& e) { - SAL_WARN("sc.orcus", "parsing failed with an unknown error"); + SAL_WARN("sc.orcus", "parsing failed with an unknown error " << e.what()); } } diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index da1699ae53fc..16b664a6754e 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -232,10 +232,10 @@ SdPage* DocumentHelper::AddMasterPage ( pClonedMasterPage = nullptr; DBG_UNHANDLED_EXCEPTION(); } - catch(const ::std::exception&) + catch(const ::std::exception& e) { pClonedMasterPage = nullptr; - SAL_WARN("sd", "caught general exception"); + SAL_WARN("sd", "caught general exception " << e.what()); } catch(...) { |