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