use of io.dingodb.net.NetError in project dingo by dingodb.
the class ErrorMessage method load.
@Override
public ErrorMessage load(byte[] bytes) {
NetError netError = getErrorByCode(PrimitiveCodec.readVarInt(bytes));
int codeLen = PrimitiveCodec.computeVarIntSize(netError.getCode());
netError.format(new String(bytes, codeLen - 1, bytes.length - codeLen));
this.error = netError;
return this;
}
Aggregations