Sha256: fe94d3d69594047708cfc60b0f8d2f114736560a3a62fd11220743ecef33cfb3

Contents?: true

Size: 543 Bytes

Versions: 7

Compression:

Stored size: 543 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
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
3scale_toolbox-0.15.0 lib/3scale_toolbox/error.rb
3scale_toolbox-0.14.0 lib/3scale_toolbox/error.rb
3scale_toolbox-0.13.0 lib/3scale_toolbox/error.rb
3scale_toolbox-0.12.4 lib/3scale_toolbox/error.rb
3scale_toolbox-0.12.3 lib/3scale_toolbox/error.rb
3scale_toolbox-0.12.2 lib/3scale_toolbox/error.rb
3scale_toolbox-0.11.0 lib/3scale_toolbox/error.rb