func (p *RpcException) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:msg: ", p), err) } if err := oprot.WriteString(string(p.Msg)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.msg (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:msg: ", p), err) } return err }
func (p *RpcException) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("code", thrift.I32, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } if err := oprot.WriteI32(int32(p.Code)); err != nil { return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } return err }