errorAfterFinally property

Object? errorAfterFinally
getter/setter pair

An error that is only passing through a finally block: it was raised in a protected region that has no matching catch clause, so it must be re-raised at the enclosing try once the finally has finished.

SCC12: it cannot simply be left in currentError while the finally runs. The state machine clears currentError after every statement that completes normally, so an error parked there is erased by the first statement of the finally block — which is how an exception thrown inside try { … } finally { … } inside an async function used to vanish altogether, leaving the enclosing catch unrun.

Implementation

Object? errorAfterFinally;