Exception: RTM::API::Error
- Inherits:
-
StandardError
- Object
- StandardError
- RTM::API::Error
- Defined in:
- lib/rtmilk/api.rb
Overview
Exception class, takes msg and code.
Instance Method Summary collapse
-
#initialize(h) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(h) ⇒ Error
Returns a new instance of Error.
99 100 101 102 103 104 |
# File 'lib/rtmilk/api.rb', line 99 def initialize(h) err = h['err'].first @code = err['code'].to_i msg = err['msg'] + ' (error code=' + err['code'] + ')' super(msg) end |