Sha256: 79536d8cc32a0ab936a0238824617f8a8ea05a3c928209fc8e72ffd959509a56

Contents?: true

Size: 439 Bytes

Versions: 4

Compression:

Stored size: 439 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module SorbetProgress
  # Parent class of all errors raised by SorbetProgress.
  # Every error should have a unique number.
  class Error < StandardError
    extend T::Sig

    sig { params(number: Integer, message: String).void }
    def initialize(number, message)
      super(
        format(
          "%s (SPE%d)",
          message,
          number
        )
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sorbet-progress-0.3.0 lib/sorbet_progress/error.rb
sorbet-progress-0.2.5 lib/sorbet_progress/error.rb
sorbet-progress-0.2.4 lib/sorbet_progress/error.rb
sorbet-progress-0.2.3 lib/sorbet_progress/error.rb