コード例 #1
0
ファイル: Program.cs プロジェクト: khoussem/Exceptionless
        private static void UnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e) {
            // test adding an extra tag.
            e.Error.Tags.Add("ExtraTag");

            if (e.Exception.GetType() == typeof(InvalidOperationException))
                e.Cancel = true;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: xvoices/Exceptionless
        private static void UnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e)
        {
            // test adding an extra tag.
            e.Error.Tags.Add("ExtraTag");

            if (e.Exception.GetType() == typeof(InvalidOperationException))
            {
                e.Cancel = true;
            }
        }
コード例 #3
0
ファイル: Global.asax.cs プロジェクト: khoussem/Exceptionless
        private void CurrentOnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs unhandledExceptionReportingEventArgs) {
            var p = Thread.CurrentPrincipal as ExceptionlessPrincipal;
            if (p == null)
                return;

            if (p.Project != null)
                unhandledExceptionReportingEventArgs.Error.AddObject(p.Project, "Project");

            if (p.UserEntity != null)
                unhandledExceptionReportingEventArgs.Error.AddObject(p.UserEntity, "User");
        }
コード例 #4
0
        private void CurrentOnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs args) {
            if (args.Exception.GetType() == typeof(OperationCanceledException)
                || args.Exception.GetType() == typeof(TaskCanceledException)) {
                args.Cancel = true;
                return;
            }

            var p = Thread.CurrentPrincipal as ExceptionlessPrincipal;
            if (p == null)
                return;

            if (p.Project != null)
                args.Error.AddObject(p.Project, "Project");

            if (p.UserEntity != null)
                args.Error.AddObject(p.UserEntity, "User");
        }
コード例 #5
0
        private void CurrentOnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs unhandledExceptionReportingEventArgs)
        {
            var p = Thread.CurrentPrincipal as ExceptionlessPrincipal;

            if (p == null)
            {
                return;
            }

            if (p.Project != null)
            {
                unhandledExceptionReportingEventArgs.Error.AddObject(p.Project, "Project");
            }

            if (p.UserEntity != null)
            {
                unhandledExceptionReportingEventArgs.Error.AddObject(p.UserEntity, "User");
            }
        }
コード例 #6
0
ファイル: Global.asax.cs プロジェクト: xvoices/Exceptionless
 private void OnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e)
 {
     // you can get access to the report here
     e.Error.Tags.Add("WebTag");
 }
コード例 #7
0
ファイル: Global.asax.cs プロジェクト: khoussem/Exceptionless
 private void OnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e) {
     // you can get access to the report here
     e.Error.Tags.Add("WebTag");
 }