Class: LiffException

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
MESSAGE =
2
PAYLOAD =
3
FIELDS =
{
  CODE => {:type => ::Thrift::Types::I32, :name => 'code', :enum_class => ::G_a_h_e1_a_j},
  MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
  PAYLOAD => {:type => ::Thrift::Types::STRUCT, :name => 'payload', :class => ::LiffErrorPayload, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



4505
4506
4507
4508
4509
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 4505

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