You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exception_cleanup routine is called whenever an exception object needs to be destroyed by a different runtime than the runtime which created the exception object, for instance if a Java exception is caught by a C++ catch handler. In such a case, a reason code (see above) indicates why the exception object needs to be deleted:
_URC_FOREIGN_EXCEPTION_CAUGHT = 1: This indicates that a different runtime caught this exception. Nested foreign exceptions, or rethrowing a foreign exception, result in undefined behaviour.
Section 1.6.4 reads:
Otherwise, a catch block catching a foreign exception is allowed:
to resume normal execution, thereby stopping propagation of the foreign exception and deleting it, or
to rethrow the foreign exception. In that case, the original exception object must be unaltered by the C++ runtime.
So is it allowed to rethrow a foreign exception or does that cause UB?
The text was updated successfully, but these errors were encountered:
The EH ABI seems to be internally inconsistent.
Section 1.2 reads:
Section 1.6.4 reads:
So is it allowed to rethrow a foreign exception or does that cause UB?
The text was updated successfully, but these errors were encountered: