protected async Task TaskError(int taskId, GameAction action, BaseResponse response = null, string message = null) { if (message == null) { message = action.ToString() + " Error"; } var info = new TaskErrorInfo() { action = action, error = (GameError)(-(int)action), taskId = taskId }; await TaskError(info, response, message); }
protected async Task TaskError(TaskErrorInfo info, BaseResponse response = null, string message = null) { if (message != null) { info.message = message; } if (response != null) { info.sourceCode = response.code.ToString(); info.sourceData = response.RequestMessage; info.sourceMessage = response.message; if (response.message != null && response.message.IndexOf("维护") != -1) { info.error = GameError.MAINTAIN; } else if (response.code == 99) { info.error = GameError.NET_ERROR; } } await taskErrorActor.Ask(info); }