Sha256: 5771a0862c647f149c04ad93b516ab22607cd8fb69429d6129b7d152e84ab799

Contents?: true

Size: 462 Bytes

Versions: 2

Compression:

Stored size: 462 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Typed
  # Error when user attempts to unwrap payload for Success Result without payload.
  class NilPayloadError < StandardError
    extend T::Sig

    sig { void }
    def initialize
      super("Attempted to unwrap payload from a Success Result where payload is nil. If you need to return a value, make sure the Result is initialized with a 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/nil_payload_error.rb
sorbet-result-0.2.0 lib/typed/nil_payload_error.rb