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