[Libreoffice-commits] core.git: cppu/source

jan iversen jani at documentfoundation.org
Mon Nov 9 23:21:27 PST 2015


 cppu/source/uno/lbenv.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 5ff684477d7cb67a52223d555ae5f1341c6f8517
Author: jan iversen <jani at documentfoundation.org>
Date:   Mon Nov 9 19:13:57 2015 +0100

    cid#1338242 cid#1338241 removed throw from extern "C" function
    
    Encapsulated throw from C++ to a return false in the "C" function
    
    Change-Id: I2fc89b0dcf434395859300b3d3890247d1288295
    Reviewed-on: https://gerrit.libreoffice.org/19872
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index d036212..e1d294f 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1050,10 +1050,16 @@ static bool loadEnv(OUString const  & cLibStem,
     // late init with some code from matching uno language binding
     // will be unloaded by environment
     osl::Module aMod;
-    bool bMod = cppu::detail::loadModule(aMod, cLibStem);
-
-    if (!bMod)
+    try {
+        bool bMod = cppu::detail::loadModule(aMod, cLibStem);
+        if (!bMod)
+            return false;
+    }
+    catch(...) {
+        // Catch everything and convert to return false
         return false;
+    }
+
 
     uno_initEnvironmentFunc fpInit = reinterpret_cast<uno_initEnvironmentFunc>(aMod.getSymbol(UNO_INIT_ENVIRONMENT));
 


More information about the Libreoffice-commits mailing list