]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/toolchain/ConfigReader.java
1) Applied ToolArg and FileArg class to represent tool arguments
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / toolchain / ConfigReader.java
index 6ad4d44388aa14b6ca0419e2d1de4de3c8e847f0..fa1fc239f4ffd26d6ff1637176aa77503fd85a6f 100644 (file)
@@ -50,7 +50,7 @@ public class ConfigReader {
 \r
       @return   String[][]      The variables defined in the config file\r
 \r
-      @throws   EdkException\r
+      @throws   GenBuildException\r
                 Config file's format is not valid\r
     **/\r
     public static synchronized String[][] parse(File configFile) throws GenBuildException {\r
@@ -78,7 +78,8 @@ public class ConfigReader {
                 // \r
                 int index;\r
                 if ((index = str.indexOf('=')) <= 0) {\r
-                    throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath() \r
+                    throw new GenBuildException("ERROR Processing file [" \r
+                        + configFile.getAbsolutePath() \r
                         + "] (line " + lines + ").\n");\r
                 }\r
 \r
@@ -88,9 +89,12 @@ public class ConfigReader {
                 keyList.add(str.substring(0, index).trim());\r
                 valueList.add(str.substring(index + 1).trim());\r
             }\r
-        } catch (Exception e) {\r
-            throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath() \r
-                + "] (line " + lines + ").\n" + e.getMessage());\r
+        } catch (Exception ex) {\r
+            GenBuildException e = new GenBuildException("ERROR Processing file [" \r
+                + configFile.getAbsolutePath() \r
+                + "] (line " + lines + ").\n" + ex.getMessage());\r
+            e.setStackTrace(ex.getStackTrace());\r
+            throw e;\r
         }\r
 \r
         String[][] definitions = new String[2][keyList.size()];\r