You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
This discussion was converted from issue #1833 on February 10, 2023 17:39.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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?
Beta Was this translation helpful? Give feedback.
All reactions