Exception: Pay::Braintree::Error
- Defined in:
- lib/pay/braintree.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
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.
Instance Method Summary collapse
- #cause ⇒ Object
-
#initialize(result) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(result) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 16 |
# File 'lib/pay/braintree.rb', line 9 def initialize(result) if result.is_a?(::Braintree::ErrorResult) super(result.) @result = result else super end end |
Instance Attribute Details
#result ⇒ Object (readonly)
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
7 8 9 |
# File 'lib/pay/braintree.rb', line 7 def result @result end |
Instance Method Details
#cause ⇒ Object
18 19 20 |
# File 'lib/pay/braintree.rb', line 18 def cause super || result end |