Exception: Mashery::Exception
- Inherits:
-
Exception
- Object
- Exception
- Mashery::Exception
- Defined in:
- lib/mashery/exceptions.rb
Direct Known Subclasses
DuplicateObjectException, HttpException, JsonRpcException, ValidationException
Class Method Summary collapse
Class Method Details
.create(options = {}) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/mashery/exceptions.rb', line 3 def self.create( = {}) case ['code'] when 1000 then ValidationException.new(['data']) when 1001 then DuplicateObjectException.new("#{['message']} (JSON-RPC error #{['code']})") else JsonRpcException.new("#{['message']} (JSON-RPC error #{['code']})") end end |