diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx index 6024ceed5cae..1c8045fafe26 100644 --- a/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx @@ -20,7 +20,10 @@ #include <sys/types.h> #include <sys/malloc.h> +#include <com/sun/star/uno/Exception.hxx> +#include <com/sun/star/uno/RuntimeException.hxx> #include <com/sun/star/uno/genfunc.hxx> +#include <o3tl/runtimetooustring.hxx> #include <uno/data.h> #include "bridge.hxx" @@ -29,8 +32,11 @@ #include "vtables.hxx" #include "share.hxx" + +#include <exception> #include <stdio.h> #include <string.h> +#include <typeinfo> using namespace ::com::sun::star::uno; @@ -294,10 +300,20 @@ static void cpp_call( try { assert( !( (pCppStack - pCppStackStart ) & 3) && "UNALIGNED STACK !!! (Please DO panic)" ); - callVirtualMethod( - pAdjustedThisPtr, aVtableSlot.index, - pCppReturn, pReturnTypeDescr->eTypeClass, - pStackStart, (pStack - pStackStart), pFPR, nFPR ); + try { + callVirtualMethod( + pAdjustedThisPtr, aVtableSlot.index, + pCppReturn, pReturnTypeDescr->eTypeClass, + pStackStart, (pStack - pStackStart), pFPR, nFPR ); + } 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; |