-
|
While talking on Slack with Modood, a problematic appeared I don't think we have a solution for right now: Shouldn't we introduce a flow directive in the catch block ? @cdavernas @fjtirado @matthias-pichler-warrify @ricardozanini wdyt ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
IMHO it's a good bad idea: |
Beta Was this translation helpful? Give feedback.
IMHO it's a good bad idea:
try/catchis not aswitch(aka flow control).To do what you propose, you can do something in the
do, thenswitch. Having athenat 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
tryclause 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.