Exception: TsJsonApi::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- TsJsonApi::Exception
- Defined in:
- lib/ts_json_api/exceptions.rb
Overview
This is the base exception class, rescue this to catch any exceptions that this gem will throw
Direct Known Subclasses
ApiLimitExceededException, ResourceNotFound, ServerBrokeConnection
Instance Attribute Summary collapse
-
#http_code ⇒ Object
Returns the value of attribute http_code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#rest_client_exception ⇒ Object
Returns the value of attribute rest_client_exception.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Exception
constructor
A new instance of Exception.
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ Exception
Returns a new instance of Exception.
8 9 10 11 12 |
# File 'lib/ts_json_api/exceptions.rb', line 8 def initialize(*args) = args. self.rest_client_exception = [:exception] self.http_code = [:http_code] || 0 end |
Instance Attribute Details
#http_code ⇒ Object
Returns the value of attribute http_code.
6 7 8 |
# File 'lib/ts_json_api/exceptions.rb', line 6 def http_code @http_code end |
#message ⇒ Object
Returns the value of attribute message.
6 7 8 |
# File 'lib/ts_json_api/exceptions.rb', line 6 def @message end |
#rest_client_exception ⇒ Object
Returns the value of attribute rest_client_exception.
6 7 8 |
# File 'lib/ts_json_api/exceptions.rb', line 6 def rest_client_exception @rest_client_exception end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/ts_json_api/exceptions.rb', line 18 def to_s end |