Ruby の beginrescueend 構文では例外クラスを指定しろという説明が多い気するけど、includeしているmoduleとかでも拾えるんでもっと柔軟だよねというアレ
module Role end
class Foo < Exception
include Role
end
begin
raise Foo
rescue Role => err
puts "We can rescued an error `#{err.inspect}` with an included module"
end
# => We can rescued an error `#<Foo: Foo>` with an included module