Sha256: 946f7911c6ec89d74a0803a829832d4403066b6d90844771e0ee98eb9e895e00

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

class Valvat
  Error = Class.new(RuntimeError)

  class ViesError < Error
    def initialize(faultstring = 'UNKNOWN')
      @faultstring = faultstring
      super
    end

    def to_s
      "The VIES web service returned the error '#{@faultstring}'."
    end

    def eql?(other)
      to_s.eql?(other.to_s)
    end
  end
  ViesMaintenanceError = Class.new(ViesError)

  ServiceUnavailable = Class.new(ViesMaintenanceError)
  MemberStateUnavailable = Class.new(ViesMaintenanceError)

  Timeout = Class.new(ViesError)
  InvalidRequester = Class.new(ViesError)
  BlockedError = Class.new(ViesError)
  RateLimitError = Class.new(ViesError)

  UnknownViesError = Class.new(ViesError)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
valvat-1.1.2 lib/valvat/error.rb
valvat-1.1.1 lib/valvat/error.rb
valvat-1.1.0 lib/valvat/error.rb