Class: ThingsException

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_c_y0_a_a_m0},
  REASON => {:type => ::Thrift::Types::STRING, :name => 'reason'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



8701
8702
8703
8704
8705
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8701

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