Exception: Weeblycloud::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/weeblycloud/cloudclient/exceptions.rb

Overview

Raised with a response error from the API

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/weeblycloud/cloudclient/exceptions.rb', line 5

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/weeblycloud/cloudclient/exceptions.rb', line 5

def message
  @message
end