Skip to content

Add a guideline against raising Exception - #988

Merged
bbatsov merged 1 commit into
masterfrom
raise-exception-guideline
Oct 30, 2026
Merged

bbatsov merged 1 commit into
masterfrom
raise-exception-guideline

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Lint/RaiseException has linked to #raise-exception since it was added, but the guideline never existed. Supersedes #775, whose good example raised StandardError.

Lint/RaiseException links to #raise-exception, which didn't exist yet.
#775 proposed one, but its good example raised StandardError, which is
a base class rather than something to raise. A specific exception class
or a plain RuntimeError is what should replace Exception.
@bbatsov
bbatsov merged commit 0bbb595 into master Oct 30, 2026
2 checks passed
@bbatsov
bbatsov deleted the raise-exception-guideline branch October 30, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant