]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java
Unify the logger and exception in AutoGen.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / autogen / AutogenLibOrder.java
index 28e2a296f156bd91fedfa705aee12aec2f8fc5c8..bddea90aab2dee3f612bb7a7d91e3660415a46f4 100644 (file)
@@ -22,9 +22,11 @@ import java.util.List;
 import java.util.Map;\r
 \r
 import org.apache.xmlbeans.XmlObject;\r
+import org.tianocore.build.exception.AutoGenException;\r
 import org.tianocore.build.global.GlobalData;\r
 import org.tianocore.build.global.SurfaceAreaQuery;\r
 import org.tianocore.build.id.ModuleIdentification;\r
+import org.tianocore.common.exception.EdkException;\r
 \r
 /**\r
   This class This class is to reorder library instance sequence according to\r
@@ -55,7 +57,7 @@ public class AutogenLibOrder {
       @param  libraryList   List of the library instance.\r
       @throws Exception\r
     **/\r
-    AutogenLibOrder(ModuleIdentification[] libraryList, String arch) throws Exception {\r
+    AutogenLibOrder(ModuleIdentification[] libraryList, String arch) throws EdkException {\r
         LibraryInstanceNode libInstanceNode;\r
         String[]       libClassDeclList = null;\r
         String[]       libClassConsmList = null;\r
@@ -80,9 +82,9 @@ public class AutogenLibOrder {
                     classStr[k] = libClassConsmList[k];\r
                 }\r
                 if (this.libInstanceMap.containsKey(libraryList[i])) {\r
-                    throw new Exception(\r
+                    throw new AutoGenException(\r
                             libraryList[i].getName()\r
-                                    + "this library instance already exists, please check the library instance list!");\r
+                                    + "-- this library instance already exists, please check the library instance list!");\r
                 } else {\r
                     this.libInstanceMap.put(libraryList[i], classStr);\r
                 }\r
@@ -98,7 +100,7 @@ public class AutogenLibOrder {
                         System.out.println(libClassDeclList[j]\r
                                 + " class is already implement by "\r
                                 + this.libClassMap.get(libClassDeclList[j]));\r
-                        throw new Exception("Library Class: " + libClassDeclList\r
+                        throw new AutoGenException("Library Class: " + libClassDeclList\r
                                 + " already has a library instance!");\r
                     } else {\r
                         this.libClassMap.put(libClassDeclList[j], libraryList[i]);\r