private void ShowErrors(CompilerResults compilerResult, SourceInfo sourceInfo) { var compilerErrors = compilerResult.Errors.OfType <CompilerError>() .Select(compilerError => new ScriptError() { ErrorNumber = compilerError.ErrorNumber, Line = sourceInfo.CalculateVisibleLineNumber(compilerError.Line), Message = compilerError.ErrorText }) .ToArray(); Logger.ShowErrors(compilerErrors); }