ruby-style-guide
ruby-style-guide copied to clipboard
Favor standard lib exceptions over new classes needs clarification
The following statement:
Favor the use of exceptions from the standard library over introducing new exception classes.
reads as if you should try not to introduce new exception classes where as in most projects you should.
It would be clearer if it was something like...
Favor the use of exceptions from the standard library versus reimplementing the same ones. Introduce new exception classes where the standard library doesn't provide what you need and ensure you namespace for your project.
Yeah, I totally agree this can be worded better and examples can be added.