Class: ShopException

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
PARAMETERMAP =
3
FIELDS =
{
  CODE => {:type => ::Thrift::Types::I32, :name => 'code', :enum_class => ::J0_a_a_b_a_a_x2},
  REASON => {:type => ::Thrift::Types::STRING, :name => 'reason'},
  PARAMETERMAP => {:type => ::Thrift::Types::MAP, :name => 'parameterMap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



9479
9480
9481
9482
9483
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 9479

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