Exception: GreenSMS::RestError
- Inherits:
-
StandardError
- Object
- StandardError
- GreenSMS::RestError
- Defined in:
- lib/greensms/http/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(msg = "RestError", code = 9, params = {}) ⇒ RestError
constructor
A new instance of RestError.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/greensms/http/error.rb', line 4 def code @code end |
#error_type ⇒ Object (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 |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/greensms/http/error.rb', line 3 def params @params end |