Skip to content

then in try\catch #914

Closed Answered by cdavernas
JBBianchi asked this question in Ideas
Jul 11, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

IMHO it's a good bad idea: try/catch is not a switch (aka flow control).
To do what you propose, you can do something in the do, then switch. Having a then at top level plus one in the catch clause would be IMO confusing, in addition of adding a new flow control that WILL be misused (ex: throwing an error to explicitly flow using the catch clause).
The try clause is not intended, in any language I know of, to be a flow directive. It's a construct to handle an error then continue/resume the normal flow.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JBBianchi
Comment options

JBBianchi Jul 11, 2024
Collaborator Author

Answer selected by JBBianchi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants