Sha256: db5f2af8567696451a16085e94245d3affcfe1e080ae8b1ff590a56ef1f7bcfe
Contents?: true
Size: 702 Bytes
Versions: 2
Compression:
Stored size: 702 Bytes
Contents
module BERTRPC class BERTRPCError < StandardError attr_accessor :code def initialize(msg = nil) case msg when Array self.code = msg[0] super(msg[1]) when String self.code = nil super(msg) else super(msg) end end end class ConnectionError < BERTRPCError end class ProtocolError < BERTRPCError NO_HEADER = [0, "Unable to read length header from server."] NO_DATA = [1, "Unable to read data from server."] end class ServerError < BERTRPCError end class UserError < BERTRPCError end class ProxyError < BERTRPCError end class InvalidOption < BERTRPCError end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
mojombo-bertrpc-0.3.2 | lib/bertrpc/errors.rb |
bertrpc-0.3.2 | lib/bertrpc/errors.rb |