Changed EdkException to GenBuildException for consistency

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1475 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36 2006-09-06 06:07:25 +00:00
parent 91f7d58229
commit 2279b26c4d
3 changed files with 20 additions and 20 deletions

View File

@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
package org.tianocore.build.toolchain;
import org.tianocore.common.exception.EdkException;
import org.tianocore.build.exception.GenBuildException;
import java.io.BufferedReader;
import java.io.File;
@ -38,7 +38,7 @@ public class ConfigReader {
@return String[][] The definition array
**/
public static synchronized String[][] parse(String filename) throws EdkException {
public static synchronized String[][] parse(String filename) throws GenBuildException {
return parse(new File(filename));
}
@ -53,7 +53,7 @@ public class ConfigReader {
@throws EdkException
Config file's format is not valid
**/
public static synchronized String[][] parse(File configFile) throws EdkException {
public static synchronized String[][] parse(File configFile) throws GenBuildException {
List<String> keyList = new ArrayList<String>(256);
List<String> valueList = new ArrayList<String>(256);
int lines = 0;
@ -78,7 +78,7 @@ public class ConfigReader {
//
int index;
if ((index = str.indexOf('=')) <= 0) {
throw new EdkException("ERROR Processing file [" + configFile.getAbsolutePath()
throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath()
+ "] (line " + lines + ").\n");
}
@ -89,7 +89,7 @@ public class ConfigReader {
valueList.add(str.substring(index + 1).trim());
}
} catch (Exception e) {
throw new EdkException("ERROR Processing file [" + configFile.getAbsolutePath()
throw new GenBuildException("ERROR Processing file [" + configFile.getAbsolutePath()
+ "] (line " + lines + ").\n" + e.getMessage());
}

View File

@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
package org.tianocore.build.toolchain;
import org.tianocore.common.exception.EdkException;
import org.tianocore.build.exception.GenBuildException;
import org.tianocore.build.toolchain.ToolChainKey;
import org.tianocore.build.toolchain.ToolChainMap;
@ -44,7 +44,7 @@ public class ToolChainConfig {
@param toolChainFile File object representing the tool chain configuration file
**/
public ToolChainConfig (File toolChainFile) throws EdkException {
public ToolChainConfig (File toolChainFile) throws GenBuildException {
config = getToolChainConfig(toolChainFile);
parseToolChainDefKey(config.keySet());
}
@ -57,7 +57,7 @@ public class ToolChainConfig {
@return ToolChainMap
**/
private ToolChainMap getToolChainConfig(File ConfigFile) throws EdkException {
private ToolChainMap getToolChainConfig(File ConfigFile) throws GenBuildException {
ToolChainMap map = new ToolChainMap();
String[][] toolChainDef = ConfigReader.parse(ConfigFile);

View File

@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
package org.tianocore.build.toolchain;
import org.tianocore.common.exception.EdkException;
import org.tianocore.build.exception.GenBuildException;
/**
ToolChainKey class is the java class form of the "name" of tool chain definition.
@ -56,7 +56,7 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keyString The key string value
@param delimiter Delimiter charater concatenating the key parts
**/
public ToolChainKey(String keyString, String delimiter) throws EdkException {
public ToolChainKey(String keyString, String delimiter) throws GenBuildException {
setKey(keyString, delimiter);
}
@ -65,7 +65,7 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keyString The key string value
**/
public ToolChainKey(String keyString) throws EdkException {
public ToolChainKey(String keyString) throws GenBuildException {
setKey(keyString);
}
@ -74,7 +74,7 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keySet
**/
public ToolChainKey(String[] keySet) throws EdkException {
public ToolChainKey(String[] keySet) throws GenBuildException {
setKey(keySet);
}
@ -156,9 +156,9 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keySet The string array of key value
**/
public void setKey(String[] keySet) throws EdkException {
public void setKey(String[] keySet) throws GenBuildException {
if (keySet.length != ToolChainKey.keyLength) {
throw new EdkException("Invalid ToolChain key");
throw new GenBuildException("Invalid ToolChain key");
}
//
@ -185,9 +185,9 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keySetString The new value of "index" part of key
@param index The key part index
**/
public void setKey(String keySetString, int index) throws EdkException {
public void setKey(String keySetString, int index) throws GenBuildException {
if (index >= ToolChainKey.keyLength) {
throw new EdkException("Invalid ToolChain key index");
throw new GenBuildException("Invalid ToolChain key index");
}
//
@ -210,11 +210,11 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keyString The key value string
**/
public void setKey(String keyString) throws EdkException {
public void setKey(String keyString) throws GenBuildException {
this.keySet = keyString.split(this.delimiter);
if (this.keySet.length != ToolChainKey.keyLength) {
throw new EdkException("Invalid ToolChain key");
throw new GenBuildException("Invalid ToolChain key");
}
this.keyString = keyString;
@ -230,11 +230,11 @@ public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainK
@param keyString The key value string
@param delimiter The delimiter concatenating the key string
**/
public void setKey(String keyString, String delimiter) throws EdkException {
public void setKey(String keyString, String delimiter) throws GenBuildException {
this.keySet = keyString.split(delimiter);
if (this.keySet.length != ToolChainKey.keyLength) {
throw new EdkException("Invalid ToolChain key");
throw new GenBuildException("Invalid ToolChain key");
}
this.keyString = keyString;