Exception: Finicity::GenericError
- Inherits:
-
StandardError
- Object
- StandardError
- Finicity::GenericError
- Defined in:
- lib/finicity/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#finicity_code ⇒ Object
readonly
Returns the value of attribute finicity_code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(error_message = nil, http_status = nil, finicity_code = nil) ⇒ GenericError
constructor
A new instance of GenericError.
- #to_s ⇒ Object
Constructor Details
#initialize(error_message = nil, http_status = nil, finicity_code = nil) ⇒ GenericError
Returns a new instance of GenericError.
5 6 7 8 9 |
# File 'lib/finicity/errors.rb', line 5 def initialize( = nil, http_status = nil, finicity_code = nil) @error_message = @http_status = http_status @finicity_code = finicity_code end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
3 4 5 |
# File 'lib/finicity/errors.rb', line 3 def @error_message end |
#finicity_code ⇒ Object (readonly)
Returns the value of attribute finicity_code.
3 4 5 |
# File 'lib/finicity/errors.rb', line 3 def finicity_code @finicity_code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
3 4 5 |
# File 'lib/finicity/errors.rb', line 3 def http_status @http_status end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 |
# File 'lib/finicity/errors.rb', line 11 def to_s status = http_status.nil? ? "" : "[Status #{http_status}] " code = finicity_code.nil? ? "" : "[Finicity Code #{finicity_code}] " "#{status}#{code}#{}" end |