]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Report error messages more precise.
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Aug 2006 09:39:01 +0000 (09:39 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Aug 2006 09:39:01 +0000 (09:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1323 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Tools/Source/GenBuild/org/tianocore/build/global/Spd.java
Tools/Source/GenBuild/org/tianocore/build/id/Identification.java

index 5cb8e6f3e9217e005800df2cf7c0629c7a3a2947..74a2d4fe435987ffe6758d044d583e32068b8e44 100644 (file)
@@ -412,7 +412,7 @@ public class GlobalData {
             return msaMap;\r
         }\r
         catch (Exception ex){\r
-            throw new BuildException(ex.getMessage());\r
+            throw new BuildException("Parsing MSA file [" + msaFile.getPath() + "] error. \n" + ex.getMessage() );\r
         }\r
     }\r
 \r
@@ -598,7 +598,7 @@ public class GlobalData {
                 return packageId;\r
             }\r
         }\r
-        throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
+        throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");\r
     }\r
 \r
     public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {\r
@@ -606,7 +606,7 @@ public class GlobalData {
         moduleId.setPackage(packageId);\r
         Spd spd = spdTable.get(packageId);\r
         if (spd == null) {\r
-            throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
+            throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");\r
         }\r
         Set<ModuleIdentification> modules = spd.getModules();\r
         Iterator<ModuleIdentification> iter = modules.iterator();\r
@@ -619,7 +619,7 @@ public class GlobalData {
                 return moduleId;\r
             }\r
         }\r
-        throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");\r
+        throw new BuildException("Can't find module GUID value " + moduleId.toGuidString() + " in " + packageId + " under the current workspace!");\r
     }\r
 \r
     public synchronized static Set<PackageIdentification> getPackageList(){\r
index 8772385e4b47ae7ed5ed255f6602aea007b94b95..63568b38861ed8fefca4dc8526f530d877ca618e 100644 (file)
@@ -198,8 +198,7 @@ public class Spd {
             }\r
         }\r
         catch (Exception e) {\r
-            e.setStackTrace(e.getStackTrace());\r
-            throw new BuildException("Parse of the package description file [" + packageId.getSpdFile() + "] failed!\n"\r
+            throw new BuildException("Parse of the package description file [" + packageFile.getPath() + "] failed!\n"\r
                                      + e.getMessage());\r
         }\r
     }\r
index 5c77e8eb67925b79f4ea0e045d08eca8da510c47..677d096274e87886ad884a035243829d1c0d4bb8 100644 (file)
@@ -110,6 +110,15 @@ public class Identification {
         return version;\r
     }\r
     \r
+    public String toGuidString() {\r
+        if (version == null || version.trim().equalsIgnoreCase("")) {\r
+            return "[" + guid + "]";\r
+        }\r
+        else {\r
+            return "[" + guid + "] and version [" + version + "]"; \r
+        }\r
+    }\r
+    \r
     /* (non-Javadoc)\r
       @see java.lang.Object#hashCode()\r
     **/\r