Handling custom error
ta opened this issue · comments
Tonni Tølbøll Lund Aagesen commented
Hello,
I use the custom errors strategy to handle request data validation - it works great.
However, I was wondering if the whole flow with raise/rescue with stacktraces etc. can be avoided using throw/catch. I did some inspection of the Sinatra::Base
class, and I can see that throw/catch is used for halting.
I can't seem to find any way for me to use throw/catch instead of letting something raised be rescued and handled by handle_exception!.
Am I missing something or would this be a good feature request?