private static bool ExpectedCultureIssue(Exception ex) { // report exception WatsonReporter.ReportNonFatal(ex); // ignore expected exception return(ex is ArgumentOutOfRangeException || ex is CultureNotFoundException); }
private static void Fail(string message) { // assert in debug builds to hopefully catch problems in CI Debug.Fail(message); // record NFW to see who violates contract. WatsonReporter.ReportNonFatal(new InvalidOperationException(message)); }
private bool CanHandle(string errorId) { // make sure we have error id, otherwise, we simple don't support // this error if (errorId == null) { // record NFW to see who violates contract. WatsonReporter.ReportNonFatal(new Exception("errorId is null")); return(false); } // we accept all compiler diagnostics if (errorId.StartsWith(_errorCodePrefix)) { return(true); } return(DiagnosticProvider.IsSupportedDiagnosticId(_projectId, errorId)); }