We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
throw
Implement throw keyword which should allow throwing any object of type Error.
Error
For example:
throw new Error("An unexpected Error occurred");
The thrown error should then be catchable using the try/except statement as mentioned in #654:
try/except
try { ... throw new Error(); } except (e: Error) { print(f"Something happened! Cause: {e}"); }
JavaScript
TypeScript
The text was updated successfully, but these errors were encountered:
new
lorenzholzbauer
No branches or pull requests
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Implement
throw
keyword which should allow throwing any object of typeError
.For example:
The thrown error should then be catchable using the
try/except
statement as mentioned in #654:Exact behaviour / changes you want
throw
.Error
.JavaScript
andTypeScript
.The text was updated successfully, but these errors were encountered: