Exception: RiminderResponseException
- Inherits:
-
RiminderException
- Object
- StandardError
- RiminderException
- RiminderResponseException
- Defined in:
- lib/riminderException.rb
Instance Attribute Summary collapse
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(msg, exp) ⇒ RiminderResponseException
constructor
A new instance of RiminderResponseException.
Constructor Details
#initialize(msg, exp) ⇒ RiminderResponseException
Returns a new instance of RiminderResponseException.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/riminderException.rb', line 30 def initialize(msg, exp) response_body = exp.http_body if (response_body.length >= 201) response_body = response_body[0, 200] + '...' end msg = msg + exp.to_s + " => " + response_body @response_body = exp.http_body @status_code = exp.http_code super(msg) end |
Instance Attribute Details
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
27 28 29 |
# File 'lib/riminderException.rb', line 27 def response_body @response_body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
28 29 30 |
# File 'lib/riminderException.rb', line 28 def status_code @status_code end |