Exemple #1
0
        public static PacketCore HandleError(PacketErrorType error_type, string message, params object[] args)
        {
            PacketCore _ack = new PacketCore();

            PacketError _PacketError = new PacketError();

            _PacketError.type    = error_type;
            _PacketError.message = string.Format(message, args);

            _ack.Name = typeof(PacketError).FullName;
            _ack.Data = JsonConvert.SerializeObject(_PacketError, Formatting.None, NetworkCore.PacketUtil.json_ops);

            return(_ack);
        }
Exemple #2
0
 public PacketHandleException(PacketErrorType type, string message, params object[] args)
     : base(string.Format(message, args))
 {
     this.type = type;
 }