Skip to content

why can't we use re-throw with the ternary operator? #1789

Answered by gafter
jinujoseph asked this question in Q&A
Discussion options

You must be logged in to vote

Part of the reason for simplifying the specification for throw expressions to forbid "rethrow" is that it would have made the specification more complex - for example, we'd have to forbid rethrow in exception filters. That would have been possible but the benefit of doing so was perceived to be not worth the effort.

It is still possible to extend the language feature further to support this. If you really care about it, make a feature request. So far nobody has cared enough.

I hope this answers your question.

Replies: 18 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants
Converted from issue

This discussion was converted from issue #1789 on October 18, 2020 08:49.