Exception: Dry::Operation::FailureHookArityError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dry/operation/errors.rb

Overview

Defined failure hook has wrong arity

Instance Method Summary collapse

Constructor Details

#initialize(hook:) ⇒ FailureHookArityError

Returns a new instance of FailureHookArityError.



52
53
54
55
56
57
# File 'lib/dry/operation/errors.rb', line 52

def initialize(hook:)
  super <<~MSG
    ##{hook.name} must accept 1 (failure) or 2 (failure, method name)      arguments, but its arity is #{hook.arity}
  MSG
end