protected void StrongerPost(object requestDto) { try { this.Post(requestDto); } catch (Exception ex) { ServiceLogger.Error(ex); this.Post(requestDto); } }
protected virtual void WriteLog(Exception ex, object requestDto) { if (requestDto != null) { StackTrace trace = new StackTrace(true); string errorLog = string.Format("{0}, requestDtoType: {1}, requestDto: {2}, 堆栈: {3}", ex.Message, requestDto.GetType().Name, JsonConvert.SerializeObject(requestDto), trace.ToString()); if (ExceptionHelper.IsValidateException(ex)) { ServiceLogger.Info(ex, requestDto); } else { EIMLog.Logger.Error(errorLog, ex); } } }