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