// just use the current context for the error private void ReportError(int severity, CssErrorCode errorNumber, params object[] arguments) { ReportError(severity, errorNumber, (m_currentToken != null ? m_currentToken.Context : null), arguments); }
private void ReportError(int severity, CssErrorCode error, params object[] args) { // guide: 0 == syntax error // 1 == the programmer probably did not intend to do this // 2 == this can lead to problems in the future. // 3 == this can lead to performance problems // 4 == this is just not right string message = CssStrings.ResourceManager.GetString(error.ToString(), CssStrings.Culture).FormatInvariant(args); OnScannerError(new CssScannerException( (int)error, severity, m_context.End.Line, m_context.End.Char, message )); }
private void ReportError(int severity, CssErrorCode errorNumber, CssContext context, params object[] arguments) { // guide: 0 == syntax error // 1 == the programmer probably did not intend to do this // 2 == this can lead to problems in the future. // 3 == this can lead to performance problems // 4 == this is just not right string message = CssStrings.ResourceManager.GetString(errorNumber.ToString(), CssStrings.Culture).FormatInvariant(arguments); CssParserException exc = new CssParserException( (int)errorNumber, severity, (context != null) ? context.Start.Line : 0, (context != null) ? context.Start.Char : 0, message); // but warnings we want to just report and carry on OnCssError(exc); }