**/\r
package org.tianocore.build.toolchain;\r
\r
-import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.build.exception.GenBuildException;\r
\r
import java.io.BufferedReader;\r
import java.io.File;\r
\r
@return String[][] The definition array\r
**/\r
- public static synchronized String[][] parse(String filename) throws EdkException {\r
+ public static synchronized String[][] parse(String filename) throws GenBuildException {\r
return parse(new File(filename));\r
}\r
\r
@throws EdkException\r
Config file's format is not valid\r
**/\r
- public static synchronized String[][] parse(File configFile) throws EdkException {\r
+ public static synchronized String[][] parse(File configFile) throws GenBuildException {\r
List<String> keyList = new ArrayList<String>(256);\r
List<String> valueList = new ArrayList<String>(256);\r
int lines = 0;\r
// \r
int index;\r
if ((index = str.indexOf('=')) <= 0) {\r
- throw new EdkException("ERROR Processing file [" + configFile.getAbsolutePath() \r
+ throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath() \r
+ "] (line " + lines + ").\n");\r
}\r
\r
valueList.add(str.substring(index + 1).trim());\r
}\r
} catch (Exception e) {\r
- throw new EdkException("ERROR Processing file [" + configFile.getAbsolutePath() \r
+ throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath() \r
+ "] (line " + lines + ").\n" + e.getMessage());\r
}\r
\r