Exception: Dry::Operation::FailureHookArityError
- Inherits:
-
StandardError
- Object
- StandardError
- Dry::Operation::FailureHookArityError
- Defined in:
- lib/dry/operation/errors.rb
Overview
Defined failure hook has wrong arity
Instance Method Summary collapse
-
#initialize(hook:) ⇒ FailureHookArityError
constructor
A new instance of FailureHookArityError.
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 |