Sha256: eb8d878c944ba84ada38edb078854deae3ad34f0d605987bd29c0c62392f53f1

Contents?: true

Size: 513 Bytes

Versions: 78

Compression:

Stored size: 513 Bytes

Contents

module Pay
  module Braintree
    class Error < Pay::Error
      # For any manually raised Braintree error results (for failure responses)
      # we can raise this exception manually but treat it as if we wrapped an exception

      attr_reader :result

      def initialize(result)
        if result.is_a?(::Braintree::ErrorResult)
          super(result.message)
          @result = result
        else
          super
        end
      end

      def cause
        super || result
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
pay-7.3.0 lib/pay/braintree/error.rb
pay-7.2.1 lib/pay/braintree/error.rb
pay-7.1.1 lib/pay/braintree/error.rb
pay-7.1.0 lib/pay/braintree/error.rb
pay-7.0.0 lib/pay/braintree/error.rb
pay-6.8.1 lib/pay/braintree/error.rb
pay-6.8.0 lib/pay/braintree/error.rb
pay-6.7.2 lib/pay/braintree/error.rb
pay-6.7.1 lib/pay/braintree/error.rb
pay-6.7.0 lib/pay/braintree/error.rb
pay-6.6.1 lib/pay/braintree/error.rb
pay-6.6.0 lib/pay/braintree/error.rb
pay-6.5.0 lib/pay/braintree/error.rb
pay-6.4.0 lib/pay/braintree/error.rb
pay-6.3.4 lib/pay/braintree/error.rb
pay-6.3.3 lib/pay/braintree/error.rb
pay-6.3.2 lib/pay/braintree/error.rb
pay-6.3.1 lib/pay/braintree/error.rb
pay-6.3.0 lib/pay/braintree/error.rb
pay-6.2.4 lib/pay/braintree/error.rb