Sha256: bb8fa4afc88a46295c1c080fcd52822ab105a2fdf9ee986abd264f5665ab26f4

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module T
  # Error when user attempts to unwrap payload for Success Result without payload.
  class NilPayloadError < StandardError
    extend 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.1.1 lib/t/nil_payload_error.rb
sorbet-result-0.1.0 lib/t/nil_payload_error.rb