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;
            }
        }
Пример #2
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;
            }
        }