1
 Follower
13
 Likes

Ability to rethrow exception

Backend
New

I think this should have been posted already, but I could not find it.

Would be good to have ability to rethrow an exception in exception handler - preserving it's type and message and (ideally) stack trace - similar to what C# statement "throw;" would do.

The problem is: we have global OnException handler in the application, which catches SecurityException and if it shows that login has expired - redirects to login screen. But there are also own exception handlers inside of some actions, which catch AllExceptions for their own reason and this way the above global handler is not involved. I know I can make those actions catch all types of exceptions except SecurityException, but this means a lot of copy-paste (example is below). Would be good and neat if they could catch AllExcepions, do whatever they need, and then throw it for global handler to do the rest. But this won't work because I can throw only UserException or AbortActivity, plus there is no way to know concrete type in AllExceptions handler.

Created on 26 Sep 2018
Comments (1)

Changed the category to Backend


views
224
Followers
1