Sha256: 3caa9f541d27aa3bb7079c0c8a72989785abea688364f60ffe92eee2d87416e3

Contents?: true

Size: 1.74 KB

Versions: 12

Compression:

Stored size: 1.74 KB

Contents

module Braintree # :nodoc:
  # Super class for all Braintree exceptions.
  class BraintreeError < ::StandardError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class AuthenticationError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class AuthorizationError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class ConfigurationError < BraintreeError
    def initialize(setting, message) # :nodoc:
      super "Braintree::Configuration.#{setting} #{message}"
    end
  end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class DownForMaintenanceError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class ForgedQueryString < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class NotFoundError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class ServerError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class SSLCertificateError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class UnexpectedError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class UpgradeRequiredError < BraintreeError; end

  # See http://www.braintreepayments.com/docs/ruby/general/exceptions
  class ValidationsFailed < BraintreeError
    attr_reader :error_result

    def initialize(error_result)
      @error_result = error_result
    end

    def inspect
      "#<#{self.class} error_result: #{@error_result.inspect}>"
    end

    def to_s
      inspect
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
braintree-2.15.0 lib/braintree/exceptions.rb
braintree-2.14.0 lib/braintree/exceptions.rb
braintree-2.13.4 lib/braintree/exceptions.rb
braintree-2.13.3 lib/braintree/exceptions.rb
braintree-2.13.2 lib/braintree/exceptions.rb
braintree-2.13.1 lib/braintree/exceptions.rb
braintree-2.10.3 lib/braintree/exceptions.rb
braintree-2.13.0 lib/braintree/exceptions.rb
braintree-2.12.0 lib/braintree/exceptions.rb
braintree-2.11.0 lib/braintree/exceptions.rb
braintree-2.10.2 lib/braintree/exceptions.rb
braintree-2.10.1 lib/braintree/exceptions.rb