Exception: Typed::NoPayloadOnNoneError

Inherits:
StandardError
  • Object
show all
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

Constructor Details

#initializeNoPayloadOnNoneError

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