Sha256: b2c20a6f34c14ad7de3a40ee7a95f25236a939067d303ad9bcb338e313cbd481

Contents?: true

Size: 927 Bytes

Versions: 16

Compression:

Stored size: 927 Bytes

Contents

module ActiveMerchant #:nodoc:
  class ActiveMerchantError < StandardError #:nodoc:
  end

  class ConnectionError < ActiveMerchantError # :nodoc:
    attr_reader :triggering_exception

    def initialize(message, triggering_exception)
      super(message)
      @triggering_exception = triggering_exception
    end
  end

  class RetriableConnectionError < ConnectionError # :nodoc:
  end

  class ResponseError < ActiveMerchantError # :nodoc:
    attr_reader :response

    def initialize(response, message = nil)
      @response = response
      @message  = message
    end

    def to_s
      "Failed with #{response.code if response.respond_to?(:code)} #{response.message if response.respond_to?(:message)}"
    end
  end

  class OAuthResponseError < ResponseError # :nodoc:
  end

  class ClientCertificateError < ActiveMerchantError # :nodoc
  end

  class InvalidResponseError < ActiveMerchantError # :nodoc
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
swiss-crm-activemerchant-1.0.13 lib/active_merchant/errors.rb
swiss-crm-activemerchant-1.0.12 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.11 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.10 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.9 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.8 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.7 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.6 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.5 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.4 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.2 lib/active_merchant/errors.rb
swiss-activemerchant-1.0.1 lib/active_merchant/errors.rb
activemerchant-1.133.0 lib/active_merchant/errors.rb
activemerchant-1.131.0 lib/active_merchant/errors.rb
activemerchant-1.130.0 lib/active_merchant/errors.rb
activemerchant-1.129.0 lib/active_merchant/errors.rb