fix Issue 5911 - Closure destroys the thrown Exception