From c554bc4eba4ee5a6abaa3e2195ceb21e59b4b6d4 Mon Sep 17 00:00:00 2001 From: Trivalik_cp <42497cfff885d3ca0e6fda54fb6262dd42101bd5sx56jUzf> Date: Thu, 27 Mar 2014 20:14:13 +0000 Subject: [PATCH] nasm buid task: remove dupplicate message, add error text to ErrorList --- source2/Build/Cosmos.Build.MSBuild/NAsm.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source2/Build/Cosmos.Build.MSBuild/NAsm.cs b/source2/Build/Cosmos.Build.MSBuild/NAsm.cs index 17e504f20..9532dcf56 100644 --- a/source2/Build/Cosmos.Build.MSBuild/NAsm.cs +++ b/source2/Build/Cosmos.Build.MSBuild/NAsm.cs @@ -1,11 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Build.Utilities; using Microsoft.Build.Framework; using System.IO; -using System.Diagnostics; namespace Cosmos.Build.MSBuild { public class NAsm : BaseToolTask { @@ -40,10 +35,10 @@ namespace Cosmos.Build.MSBuild { File.Delete(OutputFile); } if (!File.Exists(InputFile)) { - Log.LogError("Input file does not exist!"); + Log.LogError("Input file \"" + InputFile + "\" does not exist!"); return false; } else if (!File.Exists(ExePath)) { - Log.LogError("Exe file not found! (File = '" + ExePath + "')"); + Log.LogError("Exe file not found! (File = \"" + ExePath + "\")"); return false; } @@ -68,9 +63,7 @@ namespace Cosmos.Build.MSBuild { if (split.Length > 3 && split[2].Contains("warning")) typ = WriteType.Warning; uint lineNumber = uint.Parse(split[1]); - errorMessage = file + " Line: " + lineNumber + " Code: " + GetLine(InputFile, lineNumber).Trim(); - this.BuildEngine.LogMessageEvent( - new BuildMessageEventArgs(errorMessage, string.Empty, string.Empty, MessageImportance.High)); + errorMessage = file + (split.Length == 4 ? split[3] : string.Empty) + " Line: " + lineNumber + " Code: " + GetLine(InputFile, lineNumber).Trim(); } } catch (Exception) { }