Methods

Files

Class Index [+]

Quicksearch

Thrift::ApplicationException

Constants

UNKNOWN
UNKNOWN_METHOD
INVALID_MESSAGE_TYPE
WRONG_METHOD_NAME
BAD_SEQUENCE_ID
MISSING_RESULT

Attributes

type[R]

Public Class Methods

new(type=UNKNOWN, message=nil) click to toggle source
    # File /tmp/buildd/evernote-mode-0.10/ruby/lib/thrift/exceptions.rb, line 41
41:     def initialize(type=UNKNOWN, message=nil)
42:       super(message)
43:       @type = type
44:     end

Public Instance Methods

read(iprot) click to toggle source
    # File /tmp/buildd/evernote-mode-0.10/ruby/lib/thrift/exceptions.rb, line 46
46:     def read(iprot)
47:       iprot.read_struct_begin
48:       while true
49:         fname, ftype, fid = iprot.read_field_begin
50:         if ftype == Types::STOP
51:           break
52:         end
53:         if fid == 1 and ftype == Types::STRING
54:           @message = iprot.read_string
55:         elsif fid == 2 and ftype == Types::I32
56:           @type = iprot.read_i32
57:         else
58:           iprot.skip(ftype)
59:         end
60:         iprot.read_field_end
61:       end
62:       iprot.read_struct_end
63:     end
write(oprot) click to toggle source
    # File /tmp/buildd/evernote-mode-0.10/ruby/lib/thrift/exceptions.rb, line 65
65:     def write(oprot)
66:       oprot.write_struct_begin('Thrift::ApplicationException')
67:       unless @message.nil?
68:         oprot.write_field_begin('message', Types::STRING, 1)
69:         oprot.write_string(@message)
70:         oprot.write_field_end
71:       end
72:       unless @type.nil?
73:         oprot.write_field_begin('type', Types::I32, 2)
74:         oprot.write_i32(@type)
75:         oprot.write_field_end
76:       end
77:       oprot.write_field_stop
78:       oprot.write_struct_end
79:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.