class ERR extends Packet {

    public static ERR loadFromPacket(byte[] packet) {
        ERR obj = new ERR();
        Proto proto = new Proto(packet, 3);
        
        obj.sequenceId = proto.get_fixed_int(1);
        proto.get_filler(1);
        obj.errorCode = proto.get_fixed_int(2);
        proto.get_filler(1);
        obj.sqlState = proto.get_fixed_str(5);
        obj.errorMessage = proto.get_eop_str();
        
        return obj;
    }

}