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