lib/micro/case/error.rb in u-case-3.0.0.rc9 vs lib/micro/case/error.rb in u-case-3.0.0

- old
+ new

@@ -44,10 +44,12 @@ class InvalidUseCase < TypeError def initialize; super('use case must be a kind or an instance of Micro::Case'.freeze); end end class InvalidInvocationOfTheThenMethod < StandardError - def initialize; super('Invalid invocation of the Micro::Case::Result#then method'); end + def initialize(class_name) + super("Invalid invocation of the #{class_name}#then method") + end end def self.by_wrong_usage?(exception) exception.is_a?(InvalidResult) || exception.is_a?(UnexpectedResult) || exception.is_a?(ArgumentError) end