lib/dry/monads/errors.rb in dry-monads-1.2.0 vs lib/dry/monads/errors.rb in dry-monads-1.3.0

- old
+ new

@@ -11,7 +11,17 @@ class InvalidFailureTypeError < StandardError def initialize(failure) super("Cannot create Failure from #{ failure.inspect }, it doesn't meet the constraints") end end + + # Improper use of None + class ConstructorNotAppliedError < NoMethodError + def initialize(method_name, constructor_name) + super( + "For calling .#{method_name} on #{constructor_name}() build a value "\ + "by appending parens: #{constructor_name}()" + ) + end + end end end