コード例 #1
0
        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);
        }
コード例 #2
0
 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);
コード例 #3
0
 private void ConnectionMultiplexerInternalError(object sender, InternalErrorEventArgs e)
 {
     if (e.Exception != null && DateTime.UtcNow.AddMinutes(_exceptionThresholdMinutes) > _lastInternalError)
     {
         _lastInternalError = DateTime.UtcNow;
     }
 }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
        /// <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);
            }
        }
コード例 #6
0
        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;
            }
        }
コード例 #7
0
 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);
     }
 }
コード例 #8
0
 private void OnInternalError(object sender, InternalErrorEventArgs eventArgs)
 {
     log.LogError(
         "Redis Internal Error: EndPoint='{0}', Origin='{1}', Exception='{2}'",
         eventArgs.EndPoint,
         eventArgs.Origin,
         eventArgs.Exception);
 }
コード例 #9
0
ファイル: TestBase.cs プロジェクト: haf/StackExchange.Redis
 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);
     }
 }
コード例 #10
0
ファイル: RedisManager.cs プロジェクト: 554393109/DotNetCore
 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)}】"
     });
 }
コード例 #11
0
        /// <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);
            }
        }
コード例 #12
0
        void connection_InternalError(object sender, InternalErrorEventArgs e)
        {
            var ev = OnInternalError;

            if (ev != null)
            {
                ev(sender as ConnectionMultiplexer, e);
            }
        }
コード例 #13
0
        private void ConnectionMultiplexer_InternalError(object sender, InternalErrorEventArgs e)
        {
            if (_disposed)
            {
                return;
            }

            logger.LogWarning("Redis internal error, now reconnect...");

            TryConnect();
        }
コード例 #14
0
 /// <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;
     }
 }
コード例 #15
0
 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;
         }
     }
 }
コード例 #16
0
 /// <summary>
 /// 内部异常
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private static void MuxerInternalError(object sender, InternalErrorEventArgs e)
 {
     UnitExtension.Log("内部异常:" + e.Exception.Message);
 }
コード例 #17
0
 /// <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);
 }
コード例 #18
0
ファイル: Camera.cs プロジェクト: byu-oit-appdev/IdCard
 /// <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);
         }
 }
コード例 #19
0
        /// <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);
        }
コード例 #20
0
 /// <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}");
 }
コード例 #21
0
 public void OnError(object sender, InternalErrorEventArgs args)
 {
 }
コード例 #22
0
 /// <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);
 }
コード例 #23
0
 /// <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}");
 }
コード例 #24
0
 private void OnInternalError(object sender, InternalErrorEventArgs e)
 {
     _logger.Warn(e.Exception, "An internal error occurred in the StackExchange.Redis library ({Origin})", e.Origin);
 }
コード例 #25
0
 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");
 }
コード例 #26
0
 /// <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);
 }
コード例 #27
0
 private static void InternalError(object sender, InternalErrorEventArgs e)
 {
     _logger.LogError($"[Redis]InternalError: {e.Exception?.Message}", e.Exception);
 }
コード例 #28
0
 /// <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);
 }
コード例 #29
0
ファイル: RedisManager.cs プロジェクト: ewin66/Onmonitor
 /// <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}");
 }
コード例 #30
0
 private static void MuxerInternalError(object sender, InternalErrorEventArgs e)
 {
 }
コード例 #31
0
 /// <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);
 }
コード例 #32
0
 /// <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);
 }
コード例 #33
0
ファイル: KCVDBApiItem.cs プロジェクト: CoRelaxuma/HoppoAlpha
        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;
            }
        }