-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Misleading error message for ?? throw
.
#24891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
"Try wrapping" sounds weird, like try a few things until you stumble upon something that doesn't produce an error. |
Agree on wording. It's a suggestion, so it should't dictate that you do it, but "Maybe you want to wrap ..." is better than "Try wrapping". The grammar production for It still sucks. I think the |
"Maybe you want..." is definitely better, or "Wrapping the throw expression in parentheses would create an allowed expression." |
@lrhn You say that |
Not saying anything about I'm saying that So, no current plans to change it that I'm aware of. I don't think |
I see, thanks for your explanation 👍 |
This is a good suggestion which is still relevant. |
Also note that we could allow |
The expression
gives the error message:
This is misleading since
throw
is an expression. A more correct error message would be:The text was updated successfully, but these errors were encountered: