diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-02 15:13:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-04 15:37:30 +0200 |
commit | 6ddecf61ecada646fbd6f8809270d47289727e8a (patch) | |
tree | d4d699b1a811e751e6bb948e441c4cdd822cb708 /bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | |
parent | 3aab478e77937f9e40f4fdfa04f7d202d7391fb8 (diff) |
fillUnoException not working on std::rethrow_exception exceptions
used since...
commit dacc1b40df67d154c96b256b0d920460f38c3d11
Date: Sat Jul 28 16:33:22 2018 +0100
ofz#9597 rethrown IOException not caught by catch IOException
the adjustedPtr seems to be as expected, but the type_info not. Presumably
these are thrown as 'dependent exceptions' (?)
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_type.cc#L42
Change-Id: Ibd736abe941bb1d5facdb88139b3a0e6cf32cf1f
Reviewed-on: https://gerrit.libreoffice.org/58477
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx index 541e251506dd..12058c53a2a2 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx @@ -341,8 +341,9 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) __cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException ); } -void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno ) +void fillUnoException(uno_Any * pUnoExc, uno_Mapping * pCpp2Uno) { + __cxa_exception * header = __cxa_get_globals()->caughtExceptions; if (! header) { RuntimeException aRE( "no exception header!" ); @@ -352,8 +353,10 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping return; } + std::type_info *exceptionType = __cxxabiv1::__cxa_current_exception_type(); + typelib_TypeDescription * pExcTypeDescr = nullptr; - OUString unoName( toUNOname( header->exceptionType->name() ) ); + OUString unoName( toUNOname( exceptionType->name() ) ); #if OSL_DEBUG_LEVEL > 1 OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() ); |