Class: ChatappException

Inherits:
Thrift::Exception
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

CODE =
1
REASON =
2
FIELDS =
{
  CODE => {:type => ::Thrift::Types::I32, :name => 'code', :enum_class => ::G_a_b0_a_a_d},
  REASON => {:type => ::Thrift::Types::STRING, :name => 'reason'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



4254
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 4254

def struct_fields; FIELDS; end

#validateObject



4256
4257
4258
4259
4260
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 4256

def validate
  unless @code.nil? || ::G_a_b0_a_a_d::VALID_VALUES.include?(@code)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field code!')
  end
end