Exception: GreenSMS::RestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/greensms/http/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = "RestError", code = 9, params = {}) ⇒ RestError

Returns a new instance of RestError.



7
8
9
10
11
12
13
# File 'lib/greensms/http/error.rb', line 7

def initialize(msg = "RestError", code = 9, params = {})
  @code = code
  @name = "RestError"
  @params = params
  @error_type = _get_error_type(code)
  super(msg)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/greensms/http/error.rb', line 4

def code
  @code
end

#error_typeObject (readonly)

Returns the value of attribute error_type.



5
6
7
# File 'lib/greensms/http/error.rb', line 5

def error_type
  @error_type
end

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/greensms/http/error.rb', line 3

def params
  @params
end