[Libreoffice-commits] core.git: avmedia/source jvmfwk/plugins sc/source sd/source

Noel Grandin noelgrandin at gmail.com
Sun Aug 13 18:32:55 UTC 2017


 avmedia/source/framework/modeltools.cxx          |    5 +++--
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |    5 +++--
 sc/source/filter/orcus/xmlcontext.cxx            |    4 ++--
 sd/source/ui/sidebar/DocumentHelper.cxx          |    4 ++--
 4 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 92a9411040410a16532177d5dde8ca8968bcc12b
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Aug 13 14:01:02 2017 +0200

    log details of exception when we catch std::exception
    
    Change-Id: Ibfaba3473b11e24381d5a71a722c021ecde3488b
    Reviewed-on: https://gerrit.libreoffice.org/41112
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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(...)
         {


More information about the Libreoffice-commits mailing list