private static void Conn_InternalError(object sender, InternalErrorEventArgs e) { //TODO string errorMsg = string.Join(Environment.NewLine, e.ConnectionType, e.EndPoint, e.Exception); throw new Exception(errorMsg); }
private static void OnInternalError(object sender, InternalErrorEventArgs args) => _logger.LogWarning( args.Exception, "InternalError: {endpoint} ConnectionType: {connectionType} Origin: {origin}", GetFriendlyName(args.EndPoint), args.ConnectionType, args.Origin);
private void ConnectionMultiplexerInternalError(object sender, InternalErrorEventArgs e) { if (e.Exception != null && DateTime.UtcNow.AddMinutes(_exceptionThresholdMinutes) > _lastInternalError) { _lastInternalError = DateTime.UtcNow; } }
private void Instance_InternalEvent(object sender, RollbarEventArgs e) { //Console.WriteLine(e.TraceAsString()); RollbarApiErrorEventArgs apiErrorEvent = e as RollbarApiErrorEventArgs; if (apiErrorEvent != null) { _apiErrorsCount++; return; } CommunicationEventArgs commEvent = e as CommunicationEventArgs; if (commEvent != null) { _commSuccessCount++; return; } CommunicationErrorEventArgs commErrorEvent = e as CommunicationErrorEventArgs; if (commErrorEvent != null) { _commErrorsCount++; return; } InternalErrorEventArgs internalErrorEvent = e as InternalErrorEventArgs; if (internalErrorEvent != null) { _internalErrorsCount++; return; } }
/// <summary> /// Reports the specified rollbar logger. /// </summary> /// <param name="rollbarLogger">The rollbar logger.</param> /// <param name="dataObject">The data object.</param> /// <param name="rollbarError">The rollbar error.</param> /// <param name="message">The message.</param> /// <param name="exception">The exception.</param> /// <param name="errorCollector">The error collector.</param> public static void Report( IRollbar?rollbarLogger, object?dataObject, InternalRollbarError rollbarError, string?message, Exception?exception, IErrorCollector?errorCollector ) { var rollbarException = new RollbarException(rollbarError, message ?? rollbarError.ToString(), exception); errorCollector?.Register(rollbarException); var rollbarEvent = new InternalErrorEventArgs(rollbarLogger, dataObject, rollbarException, rollbarException.Message); if (rollbarLogger is RollbarLogger specificRollbarLogger) { specificRollbarLogger.OnRollbarEvent(rollbarEvent); } else { RollbarQueueController.Instance?.OnRollbarEvent(rollbarEvent); } }
private static void OnRollbarInternalEvent(object sender, RollbarEventArgs e) { Console.WriteLine(e.TraceAsString()); RollbarApiErrorEventArgs apiErrorEvent = e as RollbarApiErrorEventArgs; if (apiErrorEvent != null) { //TODO: handle/report Rollbar API communication error event... return; } CommunicationEventArgs commEvent = e as CommunicationEventArgs; if (commEvent != null) { //TODO: handle/report Rollbar API communication event... return; } CommunicationErrorEventArgs commErrorEvent = e as CommunicationErrorEventArgs; if (commErrorEvent != null) { //TODO: handle/report basic communication error while attempting to reach Rollbar API service... return; } InternalErrorEventArgs internalErrorEvent = e as InternalErrorEventArgs; if (internalErrorEvent != null) { //TODO: handle/report basic internal error while using the Rollbar Notifier... return; } }
protected void OnInternalError(object sender, InternalErrorEventArgs e) { Interlocked.Increment(ref failCount); lock (exceptions) { exceptions.Add("Internal error: " + e.Origin + ", " + EndPointCollection.ToString(e.EndPoint) + "/" + e.ConnectionType); } }
private void OnInternalError(object sender, InternalErrorEventArgs eventArgs) { log.LogError( "Redis Internal Error: EndPoint='{0}', Origin='{1}', Exception='{2}'", eventArgs.EndPoint, eventArgs.Origin, eventArgs.Exception); }
protected void OnInternalError(object sender, InternalErrorEventArgs e) { Interlocked.Increment(ref privateFailCount); lock (privateExceptions) { privateExceptions.Add("Internal error: " + e.Origin + ", " + EndPointCollection.ToString(e.EndPoint) + "/" + e.ConnectionType); } }
private static void Connection_InternalError(object sender, InternalErrorEventArgs e) { LogHelper.RuntimeLog(new { ReqId = string.Empty, flag_type = 4, target = string.Format("/{0}/{1}", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.FullName, new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name), LogContent = $"RedisManager InternalError 内部异常,EndPoint:【{e.EndPoint}】,ConnectionType:【{e.ConnectionType}】,Origin:【{e.Origin}】,Exception:【{JSON.Serialize(e.Exception)}】" }); }
/// <summary> /// Redis internal error event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Redis_InternalError(object sender, InternalErrorEventArgs e) { _Logger.LogError($"Redis internal error"); if (_CustomRedisEventService != null) { _CustomRedisEventService.RedisInternalError(e.EndPoint, e.Exception, e.Origin); } }
void connection_InternalError(object sender, InternalErrorEventArgs e) { var ev = OnInternalError; if (ev != null) { ev(sender as ConnectionMultiplexer, e); } }
private void ConnectionMultiplexer_InternalError(object sender, InternalErrorEventArgs e) { if (_disposed) { return; } logger.LogWarning("Redis internal error, now reconnect..."); TryConnect(); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { try { Mediinfo.Enterprise.Log.LogHelper.Intance.Error("Redis", "内部错误", "InternalError:Message" + e.Exception.Message); } catch (Exception) { //throw; } }
private void KcvdbClient_InternalError(object sender, InternalErrorEventArgs e) { try { TelemetryClient.TrackException("KCVDB internal error catched", e.Exception, new { ErrorMessage = e.Message, }); } catch (Exception ex) { if (ex.IsCritical()) { throw; } } }
/// <summary> /// 内部异常 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { UnitExtension.Log("内部异常:" + e.Exception.Message); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { Log4Helper.WriteLog("InternalError:Message" + e.Exception.Message); }
/// <summary> /// Invokes the event associated with the device experiencing an unrecoverable error /// </summary> /// <param name="e"></param> private void invokeInternalErrorEvent(InternalErrorEventArgs e) { if (OnInternalError != null) { OnInternalError(this, e); } }
/// <summary> /// Redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { Console.WriteLine("InternalError:Message" + e.Exception.Message); //logHelper.Error("Redis类库错误(MuxerInternalError),Message:" + e.Exception.Message); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void _redisInternalError(object sender, InternalErrorEventArgs e) { Debug.WriteLine($"RedisInternalError:Message:{e.Exception.Message}"); }
public void OnError(object sender, InternalErrorEventArgs args) { }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { //LogHelper.SafeLogMessage("InternalError:Message" + e.Exception.Message); }
/// <summary> /// 发生内部错误时(主要用于调试) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void ConnMultiplexer_InternalError(object sender, InternalErrorEventArgs e) { Console.WriteLine($"{nameof(ConnMultiplexer_InternalError)}: {e.Exception}"); }
private void OnInternalError(object sender, InternalErrorEventArgs e) { _logger.Warn(e.Exception, "An internal error occurred in the StackExchange.Redis library ({Origin})", e.Origin); }
private void OnInternalError(object sender, InternalErrorEventArgs e) { Logger.LogError("Redis internal error, origin:{0}, connectionType:{1}", e.Origin, e.ConnectionType); Logger.LogError(e.Exception, "Redis internal error"); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MuxerInternalError(object sender, InternalErrorEventArgs e) { //LogHelper.WriteInfoLog("InternalError:Message" + e.Exception.Message); }
private static void InternalError(object sender, InternalErrorEventArgs e) { _logger.LogError($"[Redis]InternalError: {e.Exception?.Message}", e.Exception); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { Console.WriteLine("InternalError:Message" + e.Exception.Message); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { //log.InfoAsync($"InternalError:Message{ e.Exception.Message}"); }
private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { //logger.Error("RedisConnectionHelp InternalError:Message" + e.Exception.Message); }
/// <summary> /// redis类库错误 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void MuxerInternalError(object sender, InternalErrorEventArgs e) { // NLogHelper.WriteError("redis类库错误:Message" + e.Exception.Message); }
public static IEnumerable<KCVDBApiItem> CreateInstance(InternalErrorEventArgs internalErrorArgs) { if (internalErrorArgs.ApiData == null || internalErrorArgs.TrackingIds == null) yield break; foreach (var i in Enumerable.Range(0, Math.Min(internalErrorArgs.ApiData.Length, internalErrorArgs.TrackingIds.Length))) { var item = new KCVDBApiItem(); if (internalErrorArgs.ApiData[i] != null) { item.Date = DateConverter(internalErrorArgs.ApiData[i].HttpDateHeaderValue); item.Url = internalErrorArgs.ApiData[i].RequestUri; item.HttpStatusCode = internalErrorArgs.ApiData[i].StatusCode; } item.SendStatus = KCVDBSendStatus.InternalError; item.TrackingId = internalErrorArgs.TrackingIds[i]; item.ErrorMessage = internalErrorArgs.Message; yield return item; } }