Kudu.Core.Tracing.Analytics.UnexpectedException C# (CSharp) Method

UnexpectedException() public method

public UnexpectedException ( Exception exception, bool trace = true, string memberName = null, string sourceFilePath = null, int sourceLineNumber ) : void
exception System.Exception
trace bool
memberName string
sourceFilePath string
sourceLineNumber int
return void
        public void UnexpectedException(Exception exception, bool trace = true, string memberName = null, string sourceFilePath = null, int sourceLineNumber = 0)
        {
            // this happen during unexpected situation and should not throw (masking the original exception)
            OperationManager.SafeExecute(() =>
            {
                if (exception.AbortedByKudu())
                {
                    return;
                }

                KuduEventSource.Log.KuduException(
                    _serverConfiguration.ApplicationName,
                    string.Empty,
                    string.Empty,
                    string.Empty,
                    string.Empty,
                    GetExceptionContent(exception, trace, memberName, sourceFilePath, sourceLineNumber));
            });
        }

Same methods

Analytics::UnexpectedException ( Exception ex, string method, string path, string result, string message, bool trace = true ) : void

Usage Example

Example #1
0
        public static void UnexpectedException(Exception ex, ITraceFactory traceFactory)
        {
            var analytic = new Analytics(null, new ServerConfiguration(), traceFactory);

            analytic.UnexpectedException(ex, trace: true);
        }
All Usage Examples Of Kudu.Core.Tracing.Analytics::UnexpectedException