-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Is there a typo in the Suppressing Exceptions section? #887
Comments
It indeed looks confusing. It was originally introduced as a bad example, see 4240682#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R961 This is how bad turned good 3a20519 Would you like to add a brief explanation to why it's a good (fair use) example? Here's an example of how it can look like:
|
I'm definitely happy to help the project--- I'm struggling with my orthodoxy of not seeing I'm fine if you want to close the issue so that it doesn't add noise. Thank you for the super fast and detailed response! |
Add one more to the disagree pile. inline |
This is what I meant above with “fair use”.
If you agree, a PR is welcome. As it was pointed out in prior changes, returning nil can be deliberate choice. |
At https://github.com/rubocop/ruby-style-guide#suppressing-exceptions, it says "Don't suppress" exceptions, but then lists
do_something rescue nil
as a good example.It could be my ignorance, but that reads like an example of suppressing an exception. Am I misunderstanding? Apologies if so.
The text was updated successfully, but these errors were encountered: