internal override void ReportError(ErrorSink/*!*/ sink, ErrorInfo error) { if (declaration != null) sink.Add(error, declaration.SourceUnit, declaration.Position); }
internal override void ReportError(ErrorSink/*!*/ sink, ErrorInfo error) { if (sourceUnit != null) sink.Add(error, SourceUnit, position); }
private void Add(ErrorInfo info, string/*!*/ message, SourceUnit sourceUnit, Position pos) { Debug.Assert(message != null); string full_path; ErrorPosition mapped_pos; // missing source unit means the file name shouldn't be reported (it is not available) if (sourceUnit != null) { full_path = sourceUnit.GetMappedFullSourcePath(pos.FirstLine); mapped_pos = new ErrorPosition( sourceUnit.GetMappedLine(pos.FirstLine), pos.FirstColumn, sourceUnit.GetMappedLine(pos.LastLine), pos.LastColumn); } else { full_path = null; mapped_pos = ErrorPosition.Invalid; } // filter disabled warnings: if (info.Id < 0 || (info.Group & (int)disabledGroups) == 0 && Array.IndexOf(disabledWarnings, info.Id) == -1) { // do not count disabled warnings and related locations et. al.: var severity = UpgradeSeverity(info.Severity); if (Add(info.Id, message, severity, info.Group, full_path, mapped_pos) && info.Id >= 0) counts[severity]++; } }
private void Add(ErrorInfo info, string/*!*/ message, string fullPath, ErrorPosition pos, params string[] args) { Debug.Assert(message != null); var severity = UpgradeSeverity(info.Severity); if (Add(info.Id, message, severity, info.Group, fullPath, pos) && info.Id >= 0) counts[severity]++; }
internal void Add(ErrorInfo info, string fullPath, ErrorPosition pos, string arg1, string arg2, string arg3) { Add(info, CoreResources.GetString(info.MessageId, arg1, arg2, arg3), fullPath, pos); }
internal void Add(ErrorInfo info, string fullPath, ErrorPosition pos, params string[] args) { Add(info, CoreResources.GetString(info.MessageId, args), fullPath, pos); }
internal void Add(ErrorInfo info, SourceUnit sourceUnit, Position pos, object arg1, object arg2, object arg3) { Add(info, CoreResources.GetString(info.MessageId, arg1, arg2, arg3), sourceUnit, pos); }
internal void Add(ErrorInfo info, SourceUnit sourceUnit, Position pos, params string[] args) { Add(info, CoreResources.GetString(info.MessageId, args), sourceUnit, pos); }
/// <summary>CTor from <see cref="ErrorInfo"/>, inner exception and parameters</summary> /// <param name="errorInfo">Information about error</param> /// <param name="innerException">Exception that caused this exception to be thrown</param> /// <param name="errorParams">Error parameters</param> internal CompilerException(ErrorInfo errorInfo, Exception innerException, params string[]/*!*/ errorParams) :base(errorInfo.ToString(),innerException){ Debug.Assert(errorParams != null); this.errorInfo = errorInfo; this.errorParams = errorParams; }
internal CompilerException(ErrorInfo errorInfo, params string[]/*!*/ errorParams) { Debug.Assert(errorParams != null); this.errorInfo = errorInfo; this.errorParams = errorParams; }
internal CompilerException() { errorInfo = FatalErrors.InternalError; errorParams = ArrayUtils.EmptyStrings; }
internal void Add(ErrorInfo info, SourceUnit sourceUnit, Text.Span pos, object arg1, object arg2) { Add(info, CoreResources.GetString(info.MessageId, arg1, arg2), sourceUnit, pos); }
internal void Add(ErrorInfo info, SourceUnit sourceUnit, Text.Span pos) { Add(info, CoreResources.GetString(info.MessageId), sourceUnit, pos); }