Exception: RTM::API::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rtmilk/api.rb

Overview

Exception class, takes msg and code.

Instance Method Summary collapse

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