Module: SYNOWebAPI::ErrorHandler

Included in:
API
Defined in:
lib/synowebapi/error.rb

Instance Method Summary collapse

Instance Method Details

#error_handling(error) ⇒ Object



44
45
46
47
48
49
50
51
# File 'lib/synowebapi/error.rb', line 44

def error_handling(error)
  code = error['code']
  if ERRNO.has_key?(code)
    raise StandardError.new(ERRNO[code])
  else
    raise StandardError.new(code)
  end
end