Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.4k
Use StandardError over Exception#775
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -1931,6 +1931,19 @@ end | |||
Prefer the use of exceptions from the standard library over introducing new exception classes. | |||
=== Do not `raise` `Exception` [[raise-exception]] | |||
Use `StandardError` over `Exception`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Perhaps this section should include a sentence aboutwhy one should notraise Exception
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you help with wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@denys281 Would "[Exception
] will bypass test frameworks and error reporters" do?
@marcandre Could you take a look? Cop w merged some time ago. |
This PR still needs work... |
Ping@denys281 |
Based on discussion:https://github.com/rubocop-hq/rubocop/pull/7325/files#r320964544
Rubocop issue:rubocop/rubocop#7299