Exception: Solid::Result::Error::UnexpectedOutcome
- Inherits:
-
Solid::Result::Error
- Object
- StandardError
- Solid::Result::Error
- Solid::Result::Error::UnexpectedOutcome
- Defined in:
- lib/solid/result/error.rb
Class Method Summary collapse
Class Method Details
.build(outcome:, origin:, expected: nil) ⇒ Object
18 19 20 21 22 |
# File 'lib/solid/result/error.rb', line 18 def self.build(outcome:, origin:, expected: nil) expected ||= 'Solid::Result::Success or Solid::Result::Failure' new("Unexpected outcome: #{outcome.inspect}. The #{origin} must return this object wrapped by #{expected}") end |