Exception: Weeblycloud::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Weeblycloud::ResponseError
- Defined in:
- lib/weeblycloud/cloudclient/exceptions.rb
Overview
Raised with a response error from the API
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(msg = "Unknown error occured", code) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(msg = "Unknown error occured", code) ⇒ ResponseError
Returns a new instance of ResponseError.
7 8 9 10 11 12 |
# File 'lib/weeblycloud/cloudclient/exceptions.rb', line 7 def initialize(msg = "Unknown error occured", code) @code = code @message = msg m = "(CODE: \##{@code}) #{@msg}" super(m) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/weeblycloud/cloudclient/exceptions.rb', line 5 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/weeblycloud/cloudclient/exceptions.rb', line 5 def @message end |