Exception: Typed::NoPayloadOnNoneError
- Inherits:
-
StandardError
- Object
- StandardError
- Typed::NoPayloadOnNoneError
- Extended by:
- T::Sig
- Defined in:
- lib/typed/no_payload_on_none_error.rb
Overview
Error when user attempts to access payload from a None Option.
Instance Method Summary collapse
-
#initialize ⇒ NoPayloadOnNoneError
constructor
A new instance of NoPayloadOnNoneError.
Constructor Details
#initialize ⇒ NoPayloadOnNoneError
Returns a new instance of NoPayloadOnNoneError.
10 11 12 |
# File 'lib/typed/no_payload_on_none_error.rb', line 10 def initialize super("Attempted to access `payload` from a None Option. You were probably expecting a Some Option. Check the option with `#some?` or `#none?` before attempting to access `payload`.") # rubocop:disable Layout/LineLength end |