diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx index 387b12eacdfe..b65a7819a405 100644 --- a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx @@ -17,10 +17,17 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <exception> #include <malloc.h> #include <cstring> +#include <typeinfo> +#include <com/sun/star/uno/Exception.hpp> +#include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/uno/genfunc.hxx> +#include <o3tl/runtimetooustring.hxx> #include <uno/data.h> #include "bridge.hxx" @@ -379,11 +386,21 @@ namespace try { - callVirtualMethod( - pAdjustedThisPtr, aVtableSlot.index, - pCppReturn, pReturnTypeRef, bSimpleReturn, - pStackStart, ( pStack - pStackStart ), - pGPR, pFPR, nREG); + try { + callVirtualMethod( + pAdjustedThisPtr, aVtableSlot.index, + pCppReturn, pReturnTypeRef, bSimpleReturn, + pStackStart, ( pStack - pStackStart ), + pGPR, pFPR, nREG); + } catch (css::uno::Exception &) { + throw; + } catch (std::exception & e) { + throw css::uno::RuntimeException( + "C++ code threw " + o3tl::runtimeToOUString(typeid(e).name()) + ": " + + o3tl::runtimeToOUString(e.what())); + } catch (...) { + throw css::uno::RuntimeException("C++ code threw unknown exception"); + } // NO exception occurred... *ppUnoExc = 0; |