Exception: ATT::Swift::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/att/swift.rb

Overview

Base error class for exceptions raised by Swift

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message) ⇒ Error

Creates a new Swift::Error for a Net::HTTP response with the additional message describing why the response caused the error.



53
54
55
56
# File 'lib/att/swift.rb', line 53

def initialize response, message
  @http_response = response
  super "#{message} - #{response.code}"
end

Instance Attribute Details

#http_responseObject (readonly)

Net::HTTP response for this error



47
48
49
# File 'lib/att/swift.rb', line 47

def http_response
  @http_response
end