lib/dry/errors/not_implemented.rb in dry-behaviour-0.8.0 vs lib/dry/errors/not_implemented.rb in dry-behaviour-0.9.0

- old
+ new

@@ -16,9 +16,17 @@ "Protocol “#{@proto}” failed to invoke the implementation for\n" \ " ⮩ “#{@details[:receiver].class}##{@details[:method]}”.\n" \ " ⮩ Caused by “#{cause.class}” with a message\n" \ " ⮩ “#{cause.message}”\n" \ " ⮩ Rescue this exception and inspect `NotImplemented#cause' for details." + when :arity + "Attempt to implement “#{@proto}#@details[:method]}”\n" \ + " ⮩ with a wrong arity for “#{@details[:target]}”.\n" \ + " ⮩ Expected parameters types:\n" \ + " ⮩ “#{@details[:expected]}”\n" \ + " ⮩ Provided parameters types:\n" \ + " ⮩ “#{@details[:provided]}”\n" \ + " ⮩ Please consider providing a proper implementation." else "Protocol “#{proto}” is invalid." end super(@details[:message])