Sha256: f5d9360b5883996b43f55a93464c30733eadd8c3bb13c57efecf9e122b471f24

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

Stored size: 487 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Typed
  # Error when user attempts to access payload from a Failure Result.
  class NoPayloadOnFailureError < StandardError
    extend T::Sig

    sig { void }
    def initialize
      super("Attempted to access a payload from a Failure Result. You were probably expecting a Success Result. Check the result with #success? or #failure? before attempting to access the payload.") # rubocop:disable Layout/LineLength
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sorbet-result-0.2.1 lib/typed/no_payload_on_failure_error.rb
sorbet-result-0.2.0 lib/typed/no_payload_on_failure_error.rb