Ruby

Ruby

Made by DeepSource

Error class inheriting from Exception RB-LI1029

Anti-pattern
Major

Error classes must inherit from RuntimeError instead.

Bad practice

class C < Exception; end
C = Class.new(Exception)

Recommended

class C < RuntimeError; end
C = Class.new(RuntimeError)