Пример #1
0
        private TException TraceException <TException>(TException exception, string eventSource)
            where TException : Exception
        {
            if (TraceCore.ThrowingExceptionIsEnabled(_diagnosticTrace))
            {
                TraceCore.ThrowingException(_diagnosticTrace, eventSource, exception != null ? exception.ToString() : string.Empty, exception);
            }

            BreakOnException(exception);

            return(exception);
        }
Пример #2
0
        private TException TraceException <TException>(TException exception, string eventSource)
            where TException : Exception
        {
            string str;

            if (TraceCore.ThrowingExceptionIsEnabled(this.diagnosticTrace))
            {
                EtwDiagnosticTrace etwDiagnosticTrace = this.diagnosticTrace;
                string             str1 = eventSource;
                if (exception != null)
                {
                    str = exception.ToString();
                }
                else
                {
                    str = string.Empty;
                }
                TraceCore.ThrowingException(etwDiagnosticTrace, str1, str, exception);
            }
            this.BreakOnException(exception);
            return(exception);
        }
Пример #3
0
 private TException TraceException <TException>(TException exception, string eventSource) where TException : Exception
 {
     TraceCore.ThrowingException(Fx.Trace, eventSource, exception);
     this.BreakOnException(exception);
     return(exception);
 }