Fixed #21668 -- Better error messages for catched exceptions.