catch with method groups. #1069
Replies: 5 comments
-
So many proposals about making try / catch more concise, which I would love. i hate the verbosity and ugliness of try / catch. Hopefully one of these proposals eventually works and sticks. |
Beta Was this translation helpful? Give feedback.
-
@stuartstein777 well at some point |
Beta Was this translation helpful? Give feedback.
-
@stuartstein777 true, but most of them so far would likely lead to poor practices and obscure code. I don't see that as an issue with this proposal at all. |
Beta Was this translation helpful? Give feedback.
-
Have you seen my closed issue- #831 ? |
Beta Was this translation helpful? Give feedback.
-
@gulshan I forgot about that, I would say this is largely a duplicate. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Allow to single linear catches with method groups.
signature of HandleException must have single Exception parameter. it must not be overloaded with another Exception parameter either, else it will be compiler error.
this is not conflicting with general catch statement. since the syntaxes are different.
above code translates to
continuation of this proposal requires supporting #1068method groups can have return value too.
Beta Was this translation helpful? Give feedback.
All reactions