rubocop / rubocop/ruby-style-guide
Favor standard lib exceptions over new classes needs clarification
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 16.5k
- Forks
- 3.3k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the style-guide entry containing the quoted exception guidance and read its surrounding section for terminology and tone. Revise the wording to distinguish reimplementing standard-library exceptions from introducing genuinely project-specific exceptions, then check that the final text clearly communicates both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100