Exception: Baiwang::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Baiwang::ResponseError
- Defined in:
- lib/baiwang.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(errcode, errmsg = '') ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(errcode, errmsg = '') ⇒ ResponseError
Returns a new instance of ResponseError.
20 21 22 23 |
# File 'lib/baiwang.rb', line 20 def initialize(errcode, errmsg = '') @error_code = errcode super "(#{error_code}) #{errmsg}" end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
19 20 21 |
# File 'lib/baiwang.rb', line 19 def error_code @error_code end |