rubocop / rubocop/ruby-style-guide

Favor standard lib exceptions over new classes needs clarification

Open
#690 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Existing Rule
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.