diff --git a/lib/trailblazer/macro/rescue.rb b/lib/trailblazer/macro/rescue.rb index 4567bf8..9be5d16 100644 --- a/lib/trailblazer/macro/rescue.rb +++ b/lib/trailblazer/macro/rescue.rb @@ -1,9 +1,10 @@ module Trailblazer module Macro + DEFAULT_EXCEPTIONS = [StandardError].freeze NoopHandler = lambda { |*| } def self.Rescue(*exceptions, handler: NoopHandler, id: Rescue.random_id, &block) - exceptions = [StandardError] unless exceptions.any? + exceptions = DEFAULT_EXCEPTIONS unless exceptions.any? handler = Rescue.deprecate_positional_handler_signature(handler) handler = Trailblazer::Option(handler)