summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorjan iversen <jani@documentfoundation.org>2015-11-09 19:13:57 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-11-10 07:21:07 +0000
commit5ff684477d7cb67a52223d555ae5f1341c6f8517 (patch)
tree57d104b240fa3b493c39552d5683f6c8568353c7 /cppu
parent99e3ab6effa9356a1a444160e60ed8df099b15a3 (diff)
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@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/uno/lbenv.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index d03621282919..e1d294f53682 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));