private bool CanIgnoreExceptionForWatsonReport(Exception exception) { if (OwaDiagnostics.CanIgnoreExceptionForWatsonReport(exception)) { return(true); } TargetInvocationException ex = exception as TargetInvocationException; return(ex != null && ex.InnerException != null && OwaDiagnostics.CanIgnoreExceptionForWatsonReport(ex.InnerException)); }
public static void SendWatsonReportsForGrayExceptions(GrayException.UserCodeDelegate tryCode) { GrayException.MapAndReportGrayExceptions(tryCode, delegate(Exception exception) { if (OwaDiagnostics.CanIgnoreExceptionForWatsonReport(exception)) { ExWatson.SetWatsonReportAlreadySent(exception); return(true); } return(GrayException.IsGrayException(exception)); }); }