public void ReportError(string TaskItemString, string Filename, int nLineNum, int nCharNum, HxCompErrorSeverity Severity, string DescriptionString) { if (_logger == null) { return; } switch (Severity) { case HxCompErrorSeverity.Information: if (_verbosity == BuildLoggerVerbosity.Normal || _verbosity == BuildLoggerVerbosity.Detailed || _verbosity == BuildLoggerVerbosity.Diagnostic) { _logger.WriteLine(DescriptionString, BuildLoggerLevel.Info); } break; case HxCompErrorSeverity.Warning: _logger.WriteLine(DescriptionString, BuildLoggerLevel.Warn); break; case HxCompErrorSeverity.Error: case HxCompErrorSeverity.Fatal: _isSuccess = false; _logger.WriteLine(DescriptionString, BuildLoggerLevel.Error); break; } }
public void ReportMessage(HxCompErrorSeverity Severity, string DescriptionString) { progressReporter.ProgressMessage(DescriptionString); string status = ""; if (Severity == HxCompErrorSeverity.HxCompErrorSeverity_Error) { status = "Error: "; cError++; } else if (Severity == HxCompErrorSeverity.HxCompErrorSeverity_Fatal) { status = "Fatal: "; cFatal++; } else if (Severity == HxCompErrorSeverity.HxCompErrorSeverity_Warning) { status = "Warning: "; cWarn++; } else //if (Severity == HxCompErrorSeverity.HxCompErrorSeverity_Information) { status = "Info: "; cInfo++; } Log(status + DescriptionString); }
public void ReportError(string TaskItemString, string Filename, int nLineNum, int nCharNum, HxCompErrorSeverity Severity, string DescriptionString) { //Console.ForegroundColor = ConsoleColor.Red; //Console.WriteLine(DescriptionString); //Console.ResetColor(); ReportMessage(Severity, DescriptionString); }
void IHxCompError.ReportMessage( HxCompErrorSeverity Severity , String DescriptionString ) { Trace.WriteLine( String.Format( "HxComp [{0}]: {1}", Severity, DescriptionString ) ); _logFile.WriteLine( String.Format( "{0}: {1}", Severity, DescriptionString ) ); //If enough non-fatal errors accumulate (more than half of the topics //HxComp will abort, reporting the error here not in ReportError if ( Severity == HxCompErrorSeverity.HxCompErrorSeverity_Fatal ) { _compileFailed = true; _errorMsg = DescriptionString; } }
void IHxCompError.ReportError( String TaskItemString, String Filename, Int32 nLineNum, Int32 nCharNum, HxCompErrorSeverity Severity, String DescriptionString ) { StringBuilder msg = new StringBuilder( "HxComp error\n" ); msg.AppendFormat( "\tTaskItemString={0}\n", TaskItemString ); msg.AppendFormat( "\tFilename={0}\n", Filename ); msg.AppendFormat( "\tLineNum={0}\n", nLineNum ); msg.AppendFormat( "\tCharNum={0}\n", nCharNum ); msg.AppendFormat( "\tSeverity={0}\n", Severity ); msg.AppendFormat( "\tDescriptionString={0}\n", DescriptionString ); String sMsg = msg.ToString(); Trace.WriteLine( sMsg ); _logFile.WriteLine( sMsg ); if ( Severity == HxCompErrorSeverity.HxCompErrorSeverity_Fatal ) { _compileFailed = true; _errorMsg = sMsg; } }