Skip to content

Files

Latest commit

 

History

History
33 lines (25 loc) · 558 Bytes

Lint-DuplicateRescueException.md

File metadata and controls

33 lines (25 loc) · 558 Bytes

Pattern: Duplicate rescue exception

Issue: -

Description

This rule checks that there are no repeated exceptions used in rescue expressions.

Examples

# bad
begin
  something
rescue FirstException
  handle_exception
rescue FirstException
  handle_other_exception
end

# good
begin
  something
rescue FirstException
  handle_exception
rescue SecondException
  handle_other_exception
end

Further Reading