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

UnexpectedException() public method

public UnexpectedException ( Exception ex, string method, string path, string result, string message, bool trace = true ) : void
ex System.Exception
method string
path string
result string
message string
trace bool
return void
        public void UnexpectedException(Exception ex, string method, string path, string result, string message, bool trace = true)
        {
            // this happen during unexpected situation and should not throw (masking the original exception)
            OperationManager.SafeExecute(() =>
            {
                if (ex.AbortedByKudu())
                {
                    return;
                }

                KuduEventSource.Log.KuduException(
                    _serverConfiguration.ApplicationName,
                    NullToEmptyString(method),
                    NullToEmptyString(path),
                    NullToEmptyString(result),
                    NullToEmptyString(message),
                    GetExceptionContent(ex, trace));
            });
        }

Same methods

Analytics::UnexpectedException ( Exception exception, bool trace = true, string memberName = null, string sourceFilePath = null, int sourceLineNumber ) : 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