Exception: Errgonomic::UnwrapError

Inherits:
Error show all
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

Instance Method Summary collapse

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

#valueObject (readonly)

Returns the value of attribute value.



42
43
44
# File 'lib/errgonomic.rb', line 42

def value
  @value
end