Sha256: fc2b2e56939d8f381b476f6db1d8af7beff160e9adb1374e85e0cc328aa3945a

Contents?: true

Size: 1.86 KB

Versions: 18

Compression:

Stored size: 1.86 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 InvalidSignature < 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

18 entries across 18 versions & 1 rubygems

Version Path
braintree-2.31.0 lib/braintree/exceptions.rb
braintree-2.30.2 lib/braintree/exceptions.rb
braintree-2.30.0 lib/braintree/exceptions.rb
braintree-2.29.0 lib/braintree/exceptions.rb
braintree-2.28.0 lib/braintree/exceptions.rb
braintree-2.27.1 lib/braintree/exceptions.rb
braintree-2.27.0 lib/braintree/exceptions.rb
braintree-2.26.0 lib/braintree/exceptions.rb
braintree-2.25.0 lib/braintree/exceptions.rb
braintree-2.24.0 lib/braintree/exceptions.rb
braintree-2.23.0 lib/braintree/exceptions.rb
braintree-2.22.0 lib/braintree/exceptions.rb
braintree-2.21.0 lib/braintree/exceptions.rb
braintree-2.20.0 lib/braintree/exceptions.rb
braintree-2.19.0 lib/braintree/exceptions.rb
braintree-2.18.0 lib/braintree/exceptions.rb
braintree-2.17.0 lib/braintree/exceptions.rb
braintree-2.16.0 lib/braintree/exceptions.rb