Exception: Errgonomic::UnwrapError
- Defined in:
- lib/errgonomic.rb
Overview
Raised when unwrap! is called on a None or an Err. Carries the Err's inner value so diagnostics can show what actually went wrong.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(msg, value = nil) ⇒ UnwrapError
constructor
A new instance of UnwrapError.
Constructor Details
#initialize(msg, value = nil) ⇒ UnwrapError
Returns a new instance of UnwrapError.
44 45 46 47 |
# File 'lib/errgonomic.rb', line 44 def initialize(msg, value = nil) super(msg) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
42 43 44 |
# File 'lib/errgonomic.rb', line 42 def value @value end |