diff options
3 files changed, 14 insertions, 6 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java index 5cb8e6f3e9..74a2d4fe43 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java @@ -412,7 +412,7 @@ public class GlobalData { return msaMap;
}
catch (Exception ex){
- throw new BuildException(ex.getMessage());
+ throw new BuildException("Parsing MSA file [" + msaFile.getPath() + "] error. \n" + ex.getMessage() );
}
}
@@ -598,7 +598,7 @@ public class GlobalData { return packageId;
}
}
- throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
+ throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");
}
public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {
@@ -606,7 +606,7 @@ public class GlobalData { moduleId.setPackage(packageId);
Spd spd = spdTable.get(packageId);
if (spd == null) {
- throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
+ throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");
}
Set<ModuleIdentification> modules = spd.getModules();
Iterator<ModuleIdentification> iter = modules.iterator();
@@ -619,7 +619,7 @@ public class GlobalData { return moduleId;
}
}
- throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");
+ throw new BuildException("Can't find module GUID value " + moduleId.toGuidString() + " in " + packageId + " under the current workspace!");
}
public synchronized static Set<PackageIdentification> getPackageList(){
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/Spd.java b/Tools/Source/GenBuild/org/tianocore/build/global/Spd.java index 8772385e4b..63568b3886 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/Spd.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/Spd.java @@ -198,8 +198,7 @@ public class Spd { }
}
catch (Exception e) {
- e.setStackTrace(e.getStackTrace());
- throw new BuildException("Parse of the package description file [" + packageId.getSpdFile() + "] failed!\n"
+ throw new BuildException("Parse of the package description file [" + packageFile.getPath() + "] failed!\n"
+ e.getMessage());
}
}
diff --git a/Tools/Source/GenBuild/org/tianocore/build/id/Identification.java b/Tools/Source/GenBuild/org/tianocore/build/id/Identification.java index 5c77e8eb67..677d096274 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/id/Identification.java +++ b/Tools/Source/GenBuild/org/tianocore/build/id/Identification.java @@ -110,6 +110,15 @@ public class Identification { return version;
}
+ public String toGuidString() {
+ if (version == null || version.trim().equalsIgnoreCase("")) {
+ return "[" + guid + "]";
+ }
+ else {
+ return "[" + guid + "] and version [" + version + "]";
+ }
+ }
+
/* (non-Javadoc)
@see java.lang.Object#hashCode()
**/
|