Example #1
0
        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;
        }
Example #2
0
        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;
            }
        }
Example #3
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");
        }
Example #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");
        }
Example #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");
            }
        }
Example #6
0
 private void OnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e)
 {
     // you can get access to the report here
     e.Error.Tags.Add("WebTag");
 }
Example #7
0
 private void OnUnhandledExceptionReporting(object sender, UnhandledExceptionReportingEventArgs e) {
     // you can get access to the report here
     e.Error.Tags.Add("WebTag");
 }