static private PrintError ( string sourceFile, int line, int column, bool fIsWarning, int number, string message ) : void | ||
sourceFile | string | |
line | int | |
column | int | |
fIsWarning | bool | |
number | int | |
message | string | |
return | void |
internal static void PrintError(string sourceFile, int line, int column, bool fIsWarning,
int number, string message){
string errorNumber = (10000 + (number & 0xFFFF)).ToString(CultureInfo.InvariantCulture).Substring(1);
if (String.Compare(sourceFile, "no source", StringComparison.Ordinal) != 0)
Console.Write(sourceFile + "(" + line + "," + column + ") : ");
Console.WriteLine((fIsWarning ? "warning JS" : "error JS") + errorNumber + ": " + message);
}
// === IVsaSite === public virtual bool OnCompilerError(IVsaError error){ // Errors have severity 0, warnings have severities 1-4. Setting // nWarnLevel to 0 results in all warnings being masked. int nSeverity = error.Severity; if (nSeverity > this.options.nWarningLevel) return true; bool isWarning = (0 != nSeverity) && !this.options.fTreatWarningsAsErrors; JScriptCompiler.PrintError(error.SourceMoniker, error.Line, error.StartColumn, isWarning, error.Number, error.Description); // We want to keep on going as long as we can since it makes debugging easier, // thus we will never abort compilation (never return false) return true; }