Sha256: d4b931ca70ac3eb41ce21ccfec75d9342847c70c8f162bf36b4a747a4c8c9896

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

module ThreeScaleToolbox
  # Generic error. Superclass for all specific errors.
  class Error < ::StandardError
  end

  class InvalidUrlError < Error
  end

  class ActiveDocsNotFoundError < Error
    attr_reader :id

    def initialize(id)
      super("ActiveDocs with ID #{id} not found")
    end
  end

  class ThreeScaleApiError < Error
    attr_reader :apierrors

    def initialize(msg = '', apierrors = {})
      @apierrors = apierrors
      super(msg)
    end

    def message
      "#{super}. Errors: #{apierrors}"
    end
  end

  class InvalidIdError < Error
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
3scale_toolbox-0.16.0 lib/3scale_toolbox/error.rb