Class Thrift::ApplicationException
In: ruby/lib/thrift/exceptions.rb
Parent: Exception

Methods

new   read   write  

Constants

UNKNOWN = 0
UNKNOWN_METHOD = 1
INVALID_MESSAGE_TYPE = 2
WRONG_METHOD_NAME = 3
BAD_SEQUENCE_ID = 4
MISSING_RESULT = 5

Attributes

type  [R] 

Public Class methods

[Source]

    # File 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

[Source]

    # File 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

[Source]

    # File 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

[Validate]