Methods

Class Index [+]

Quicksearch

MessagePack::RPC::RPCError

MessagePack-RPC Exception

RPCError | +— TimeoutError | +— TransportError | | | +— NetworkUnreachableError | | | +— ConnectionRefusedError | | | +— ConnectionTimeoutError | | | +— MalformedMessageError | | | +— StreamClosedError | +— CallError | | | +— NoMethodError | | | +— ArgumentError | +— ServerError | | | +— ServerBusyError | +— RemoteError

    |
    +-- RuntimeError
    |
    +-- (user-defined errors)

Constants

SYSTEM_ERROR_TABLE

Attributes

code[R]
data[R]

Public Class Methods

create(code, data) click to toggle source
     # File lib/msgpack/rpc/exception.rb, line 175
175:         def self.create(code, data)
176:                 if code[0] == ..
177:                         code = code.dup
178:                         while true
179:                                 if klass = SYSTEM_ERROR_TABLE[code]
180:                                         return klass.new(*data)
181:                                 end
182:                                 if code.slice!(/\.[^\.]*$/) == nil || code.empty?
183:                                         return RPCError.new(code, *data)
184:                                 end
185:                         end
186: 
187:                 elsif code == RuntimeError::CODE
188:                         RuntimeError.new(*data)
189: 
190:                 else
191:                         RemoteError.new(code, *data)
192:                 end
193:         end
new(code, *data) click to toggle source
    # File lib/msgpack/rpc/exception.rb, line 63
63:         def initialize(code, *data)
64:                 @code = code.to_s
65:                 @data = data
66:                 super(@data.shift || @code)
67:         end

Public Instance Methods

is?(code) click to toggle source
    # File lib/msgpack/rpc/exception.rb, line 71
71:         def is?(code)
72:                 if code.is_a?(Class) && code < RPCError
73:                         if code == RemoteError
74:                                 return @code[0] != ..
75:                         end
76:                         code = code::CODE
77:                 end
78:                 @code == code || @code[0,code.length+1] == "#{code}."
79:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.