Fixed grammar in messages.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1256 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lhauch 2006-08-14 18:41:39 +00:00
parent 3f7b510edb
commit 391dbbb1c0
17 changed files with 83 additions and 83 deletions

View File

@ -164,7 +164,7 @@ public class FfsProcess {
System.out.println("Warning: this module doesn't specify a FfsFormatKey. "); System.out.println("Warning: this module doesn't specify a FfsFormatKey. ");
} }
else { else {
throw new BuildException("Can't find FfsFormatKey [" + buildType + "] in FPD file. "); throw new BuildException("Can't find the FfsFormatKey [" + buildType + "] attribute in the FPD file!");
} }
if (ffs == null) { if (ffs == null) {

View File

@ -112,10 +112,10 @@ public class FrameworkBuildTask extends Task{
// //
File buildFile = null; File buildFile = null;
if (msaFiles.size() > 1) { if (msaFiles.size() > 1) {
throw new BuildException("More than one MSA file under current directory. It is not allowd. "); throw new BuildException("Having more than one MSA file in a directory is not allowed!");
} }
else if (msaFiles.size() == 1 && activePlatform == null) { else if (msaFiles.size() == 1 && activePlatform == null) {
throw new BuildException("If try to build a single module, please set ACTIVE_PLATFORM in file [Tool/Conf/target.txt]. "); throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [Tool/Conf/target.txt]. ");
} }
else if (msaFiles.size() == 1 && activePlatform != null) { else if (msaFiles.size() == 1 && activePlatform != null) {
// //
@ -136,14 +136,14 @@ public class FrameworkBuildTask extends Task{
// If there is no build files or FPD files or MSA files, stop build // If there is no build files or FPD files or MSA files, stop build
// //
else { else {
throw new BuildException("Can't find any FPD files or MSA files in current directory. "); throw new BuildException("Can't find any FPD or MSA files in the current directory. ");
} }
// //
// Build every FPD files (PLATFORM build) // Build every FPD files (PLATFORM build)
// //
if (buildFile.getName().endsWith(".fpd")) { if (buildFile.getName().endsWith(".fpd")) {
System.out.println("Start to build FPD file [" + buildFile.getPath() + "] ..>> "); System.out.println("Processing the FPD file [" + buildFile.getPath() + "] ..>> ");
FpdParserTask fpdParserTask = new FpdParserTask(); FpdParserTask fpdParserTask = new FpdParserTask();
fpdParserTask.setType(type); fpdParserTask.setType(type);
fpdParserTask.setProject(getProject()); fpdParserTask.setProject(getProject());
@ -156,8 +156,8 @@ public class FrameworkBuildTask extends Task{
// //
else if (buildFile.getName().endsWith(".msa")) { else if (buildFile.getName().endsWith(".msa")) {
File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform); File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform);
System.out.println("Using FPD file [" + tmpFile.getPath() + "] as active platform. "); System.out.println("Using the FPD file [" + tmpFile.getPath() + "] for the active platform. ");
System.out.println("Start to build MSA file [" + buildFile.getPath() + "] ..>> "); System.out.println("Processing the MSA file [" + buildFile.getPath() + "] ..>> ");
GenBuildTask genBuildTask = new GenBuildTask(); GenBuildTask genBuildTask = new GenBuildTask();
genBuildTask.setSingleModuleBuild(true); genBuildTask.setSingleModuleBuild(true);
genBuildTask.setType(type); genBuildTask.setType(type);
@ -204,13 +204,13 @@ public class FrameworkBuildTask extends Task{
allFiles[index] = iter.next(); allFiles[index] = iter.next();
index++; index++;
} }
System.out.println("Find " + allFiles.length + " FPD and MSA files: "); System.out.println("Finding " + allFiles.length + " FPD and MSA files: ");
for (int i = 0; i < allFiles.length; i++) { for (int i = 0; i < allFiles.length; i++) {
System.out.println("[" + (i + 1) + "]: " + allFiles[i].getName()); System.out.println("[" + (i + 1) + "]: " + allFiles[i].getName());
} }
boolean flag = true; boolean flag = true;
System.out.print("Please select one file to build:[1] "); System.out.print("Please select one of the following FPD files to build:[1] ");
do{ do{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try { try {
@ -293,7 +293,7 @@ public class FrameworkBuildTask extends Task{
str = getValue("ACTIVE_PLATFORM", targetFileInfo); str = getValue("ACTIVE_PLATFORM", targetFileInfo);
if (str != null && ! str.trim().equals("")) { if (str != null && ! str.trim().equals("")) {
if ( ! str.endsWith(".fpd")) { if ( ! str.endsWith(".fpd")) {
throw new BuildException("FPD file's file extension must be \".fpd\""); throw new BuildException("FPD file's extension must be \".fpd\"!");
} }
activePlatform = str; activePlatform = str;
} }

View File

@ -144,7 +144,7 @@ public class GenBuildTask extends Ant {
String packageGuid = getProject().getProperty("PACKAGE_GUID"); String packageGuid = getProject().getProperty("PACKAGE_GUID");
String packageVersion = getProject().getProperty("PACKAGE_VERSION"); String packageVersion = getProject().getProperty("PACKAGE_VERSION");
if (moduleGuid == null || packageGuid == null) { if (moduleGuid == null || packageGuid == null) {
throw new BuildException("GenBuild parameters error. "); throw new BuildException("GenBuild parameter error.");
} }
PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion); PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion);
moduleId = new ModuleIdentification(moduleGuid, moduleVersion); moduleId = new ModuleIdentification(moduleGuid, moduleVersion);
@ -225,7 +225,7 @@ public class GenBuildTask extends Ant {
if (moduleSupportedArchs != null) { if (moduleSupportedArchs != null) {
for (int k = 0; k < archList.length; k++) { for (int k = 0; k < archList.length; k++) {
if ( ! moduleSupportedArchs.contains(archList[k])) { if ( ! moduleSupportedArchs.contains(archList[k])) {
throw new BuildException("ARCH [" + archList[k] + "] is not supported by " + moduleId + ". " + moduleId + " only supports [" + moduleSupportedArchs + "]."); throw new BuildException("Specified architecture [" + archList[k] + "] is not supported by " + moduleId + ". The module " + moduleId + " only supports [" + moduleSupportedArchs + "] architectures.");
} }
} }
} }
@ -240,7 +240,7 @@ public class GenBuildTask extends Ant {
// Whether the module is built before // Whether the module is built before
// //
if (moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false) { if (moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false) {
System.out.println("\nWARNING: " + moduleId + " for " + archList[k] + " is not found in current platform\n"); System.out.println("\nWARNING: " + moduleId + " for " + archList[k] + " was not found in current platform FPD file!\n");
continue; continue;
} else if (GlobalData.isModuleBuilt(fpdModuleId)) { } else if (GlobalData.isModuleBuilt(fpdModuleId)) {
return; return;
@ -265,7 +265,7 @@ public class GenBuildTask extends Ant {
// don't do anything if no tools found // don't do anything if no tools found
// //
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) { if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
System.out.println("Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n"); System.out.println("Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
continue; continue;
} }
@ -336,7 +336,7 @@ public class GenBuildTask extends Ant {
String filename = getProject().getProperty("PLATFORM_FILE"); String filename = getProject().getProperty("PLATFORM_FILE");
if (filename == null){ if (filename == null){
throw new BuildException("Plese set ACTIVE_PLATFORM if you want to build a single module. "); throw new BuildException("Please set ACTIVE_PLATFORM in the file: Tools/Conf/target.txt if you want to build a single module!");
} }
PlatformIdentification platformId = GlobalData.getPlatform(filename); PlatformIdentification platformId = GlobalData.getPlatform(filename);
@ -608,7 +608,7 @@ public class GenBuildTask extends Ant {
// then call the exist BaseName_build.xml directly. // then call the exist BaseName_build.xml directly.
// //
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) { if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
GlobalData.log.info("Call user-defined " + moduleId.getName() + "_build.xml"); GlobalData.log.info("Calling user-defined " + moduleId.getName() + "_build.xml");
Ant ant = new Ant(); Ant ant = new Ant();
ant.setProject(getProject()); ant.setProject(getProject());
ant.setAntfile(getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml"); ant.setAntfile(getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml");
@ -638,7 +638,7 @@ public class GenBuildTask extends Ant {
// then call the exist BaseName_build.xml directly. // then call the exist BaseName_build.xml directly.
// //
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) { if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
GlobalData.log.info("Call user-defined " + moduleId.getName() + "_build.xml"); GlobalData.log.info("Calling user-defined " + moduleId.getName() + "_build.xml");
Ant ant = new Ant(); Ant ant = new Ant();
ant.setProject(getProject()); ant.setProject(getProject());
ant.setAntfile(getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml"); ant.setAntfile(getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml");

View File

@ -54,10 +54,10 @@ public class ModuleBuildFileGenerator {
/// The information at the header of <em>build.xml</em>. /// The information at the header of <em>build.xml</em>.
/// ///
private String info = "DO NOT EDIT \n" private String info = "DO NOT EDIT \n"
+ "File auto-generated by build utility\n" + "This file is auto-generated by the build utility\n"
+ "\n" + "\n"
+ "Abstract:\n" + "Abstract:\n"
+ "Auto-generated ANT build file for building of EFI Modules/Platforms\n"; + "Auto-generated ANT build file for build EFI Modules and Platforms\n";
private FpdModuleIdentification fpdModuleId; private FpdModuleIdentification fpdModuleId;
@ -224,7 +224,7 @@ public class ModuleBuildFileGenerator {
xformer.setOutputProperty(OutputKeys.INDENT, "yes"); xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.transform(source, result); xformer.transform(source, result);
} catch (Exception ex) { } catch (Exception ex) {
throw new BuildException("Module [" + fpdModuleId.getModule().getName() + "] generating build file failed.\n" + ex.getMessage()); throw new BuildException("Generating the module [" + fpdModuleId.getModule().getName() + "] build.xml file failed!.\n" + ex.getMessage());
} }
} }

View File

@ -243,7 +243,7 @@ public class AutoGen {
libGenAutogenH(); libGenAutogenH();
} catch (Exception e) { } catch (Exception e) {
throw new BuildException( throw new BuildException(
"Faile to create library AutoGen.c & AutoGen.h!\n" "Failed to create library AutoGen.c & AutoGen.h!\n"
+ e.getMessage()); + e.getMessage());
} }
} }
@ -672,7 +672,7 @@ public class AutoGen {
libClassList[i]); libClassList[i]);
if (includerName == null) { if (includerName == null) {
throw new AutoGenException("Can not find library class [" throw new AutoGenException("Can not find library class ["
+ libClassList[i] + "] declaration in every packages. "); + libClassList[i] + "] declaration in any SPD package. ");
} }
for (int j = 0; j < includerName.length; j++) { for (int j = 0; j < includerName.length; j++) {
String includeNameStr = includerName[j]; String includeNameStr = includerName[j];
@ -714,7 +714,7 @@ public class AutoGen {
if (pkgHeader == null) { if (pkgHeader == null) {
throw new AutoGenException("Can not find package [" throw new AutoGenException("Can not find package ["
+ packageNameList[i] + packageNameList[i]
+ "] declaration in every packages. "); + "] declaration in any SPD package. ");
} else if (!pkgHeader.equalsIgnoreCase("")) { } else if (!pkgHeader.equalsIgnoreCase("")) {
includeStr = CommonDefinition.include + " <" + pkgHeader includeStr = CommonDefinition.include + " <" + pkgHeader
+ ">\r\n"; + ">\r\n";
@ -751,7 +751,7 @@ public class AutoGen {
case CommonDefinition.ModuleTypePeiCore: case CommonDefinition.ModuleTypePeiCore:
if (entryPointList == null ||entryPointList.length != 1 ) { if (entryPointList == null ||entryPointList.length != 1 ) {
throw new BuildException( throw new BuildException(
"Module type = 'PEI_CORE', only have one module entry point!"); "Module type = 'PEI_CORE', can have only one module entry point!");
} else { } else {
fileBuffer.append("EFI_STATUS\r\n"); fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n"); fileBuffer.append("EFIAPI\r\n");
@ -783,7 +783,7 @@ public class AutoGen {
fileBuffer.append("const UINT32 _gUefiDriverRevision = 0;\r\n"); fileBuffer.append("const UINT32 _gUefiDriverRevision = 0;\r\n");
if (entryPointList == null || entryPointList.length != 1) { if (entryPointList == null || entryPointList.length != 1) {
throw new BuildException( throw new BuildException(
"Module type = 'DXE_CORE', only have one module entry point!"); "Module type = 'DXE_CORE', can have only one module entry point!");
} else { } else {
fileBuffer.append("VOID\r\n"); fileBuffer.append("VOID\r\n");
@ -1231,7 +1231,7 @@ public class AutoGen {
// If can't find Ppi GUID declaration in every package // If can't find Ppi GUID declaration in every package
// //
throw new AutoGenException("Can not find Ppi GUID [" throw new AutoGenException("Can not find Ppi GUID ["
+ ppiKeyWord + "] declaration in every packages. "); + ppiKeyWord + "] declaration in any SPD package!");
} }
} }
} }
@ -1288,7 +1288,7 @@ public class AutoGen {
// If can't find protocol GUID declaration in every package // If can't find protocol GUID declaration in every package
// //
throw new BuildException("Can not find protocol Guid [" throw new BuildException("Can not find protocol Guid ["
+ protocolKeyWord + "] declaration in every packages. "); + protocolKeyWord + "] declaration in any SPD package!");
} }
} }
} }
@ -1331,7 +1331,7 @@ public class AutoGen {
// If can't find GUID declaration in every package // If can't find GUID declaration in every package
// //
throw new AutoGenException("Can not find Guid [" + guidKeyWord throw new AutoGenException("Can not find Guid [" + guidKeyWord
+ "] declaration in every packages. "); + "] declaration in any SPD package. ");
} }
} }
@ -1499,7 +1499,7 @@ public class AutoGen {
fileBuffer.append(" (ImageHandle, SystemTable);\r\n"); fileBuffer.append(" (ImageHandle, SystemTable);\r\n");
break; break;
default: default:
EdkLog.log(EdkLog.EDK_INFO,"Autogen don't know how to deal with module type -"+ moduleType + " !"); EdkLog.log(EdkLog.EDK_INFO,"Autogen doesn't know how to deal with module type - " + moduleType + "!");
} }
fileBuffer.append(" ASSERT_EFI_ERROR (Status);\r\n"); fileBuffer.append(" ASSERT_EFI_ERROR (Status);\r\n");
} }
@ -1985,7 +1985,7 @@ public class AutoGen {
fis.close(); fis.close();
fos.close(); fos.close();
}else { }else {
throw new AutoGenException("The flashMap.h file don't exist!!"); throw new AutoGenException("The file, flashMap.h doesn't exist!");
} }
} catch (Exception e){ } catch (Exception e){
throw new AutoGenException(e.getMessage()); throw new AutoGenException(e.getMessage());

View File

@ -85,7 +85,7 @@ public class AutogenLibOrder {
if (this.libInstanceMap.containsKey(libraryList[i])) { if (this.libInstanceMap.containsKey(libraryList[i])) {
throw new Exception( throw new Exception(
libraryList[i].getName() libraryList[i].getName()
+ "this library instance is already exist, please check you library instance list!"); + "this library instance already exists, please check the library instance list!");
} else { } else {
this.libInstanceMap.put(libraryList[i], classStr); this.libInstanceMap.put(libraryList[i], classStr);
} }
@ -102,8 +102,8 @@ public class AutogenLibOrder {
System.out.println(libClassDeclList[j] System.out.println(libClassDeclList[j]
+ " class is already implement by " + " class is already implement by "
+ this.libClassMap.get(libClassDeclList[j])); + this.libClassMap.get(libClassDeclList[j]));
throw new Exception(libClassDeclList throw new Exception("Library Class: " + libClassDeclList
+ " is already have library instance!"); + " already has a library instance!");
} else { } else {
this.libClassMap.put(libClassDeclList[j], libraryList[i]); this.libClassMap.put(libClassDeclList[j], libraryList[i]);
} }

View File

@ -317,7 +317,7 @@ public class CommonDefinition {
return guid; return guid;
} else { } else {
System.out System.out
.println("Check GUID Value, it don't conform to the schema!!!"); .println("Check GUID Value, It doesn't conform to the registry format specified in the schema!!!");
return "0"; return "0";
} }
@ -351,4 +351,4 @@ public class CommonDefinition {
return desList; return desList;
} }
} }

View File

@ -130,7 +130,7 @@ public class FpdParserTask extends Task {
// Remove !! // Remove !!
if ( fpdFile == null) { if ( fpdFile == null) {
if (platformName == null) { if (platformName == null) {
throw new BuildException("FpdParserTask parameter error. Please specify platform name or FPD file. "); throw new BuildException("FpdParserTask parameter error. Please specify either the platform name or FPD file!");
} }
platformId = GlobalData.getPlatformByName(platformName); platformId = GlobalData.getPlatformByName(platformName);
fpdFile = platformId.getFpdFile(); fpdFile = platformId.getFpdFile();
@ -300,7 +300,7 @@ public class FpdParserTask extends Task {
bw.close(); bw.close();
fw.close(); fw.close();
} catch (Exception e) { } catch (Exception e) {
throw new BuildException("Generate FV file [" + fvFile.getPath() + "] failed. \n" + e.getMessage()); throw new BuildException("Generation of the FV file [" + fvFile.getPath() + "] failed!\n" + e.getMessage());
} }
} }
} }
@ -327,7 +327,7 @@ public class FpdParserTask extends Task {
XmlObject doc = XmlObject.Factory.parse(fpdFile); XmlObject doc = XmlObject.Factory.parse(fpdFile);
if (!doc.validate()) { if (!doc.validate()) {
throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] is invalid."); throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");
} }
Map<String, XmlObject> map = new HashMap<String, XmlObject>(); Map<String, XmlObject> map = new HashMap<String, XmlObject>();
@ -378,7 +378,7 @@ public class FpdParserTask extends Task {
PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding(); PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();
ca.perform(platformId.getFpdFile().getPath(), ActionMessage.NULL_MESSAGE_LEVEL); ca.perform(platformId.getFpdFile().getPath(), ActionMessage.NULL_MESSAGE_LEVEL);
} catch (Exception e) { } catch (Exception e) {
throw new BuildException("Load FPD file [" + fpdFile.getPath() + "] error. \n" + e.getMessage()); throw new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + e.getMessage());
} }
} }

View File

@ -53,10 +53,10 @@ public class PlatformBuildFileGenerator {
private Project project; private Project project;
private String info = "DO NOT EDIT \n" private String info = "DO NOT EDIT \n"
+ "File auto-generated by build utility\n" + "This file is auto-generated by the build utility\n"
+ "\n" + "\n"
+ "Abstract:\n" + "Abstract:\n"
+ "Auto-generated ANT build file for building of EFI Modules/Platforms\n"; + "Auto-generated ANT build file for building EFI Modules and Platforms\n";
public PlatformBuildFileGenerator(Project project, Map<FpdModuleIdentification, String> outfiles, boolean isUnified){ public PlatformBuildFileGenerator(Project project, Map<FpdModuleIdentification, String> outfiles, boolean isUnified){
this.project = project; this.project = project;
@ -164,7 +164,7 @@ public class PlatformBuildFileGenerator {
xformer.setOutputProperty(OutputKeys.INDENT, "yes"); xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.transform(source, result); xformer.transform(source, result);
} catch (Exception ex) { } catch (Exception ex) {
throw new BuildException("Generate " + platformName + "_build.xml failed. \n" + ex.getMessage()); throw new BuildException("Generation of the " + platformName + "_build.xml failed!\n" + ex.getMessage());
} }
} }
@ -351,7 +351,7 @@ public class PlatformBuildFileGenerator {
// //
// Deep Clean Target // Deep Clean Target
// //
root.appendChild(document.createComment("Clean All target")); root.appendChild(document.createComment("Target: cleanall"));
Element ele = document.createElement("target"); Element ele = document.createElement("target");
ele.setAttribute("name", "cleanall"); ele.setAttribute("name", "cleanall");
@ -436,7 +436,7 @@ public class PlatformBuildFileGenerator {
// //
// User Extensions // User Extensions
// //
root.appendChild(document.createComment("Pre Build Processing")); root.appendChild(document.createComment("Pre-Build Processing"));
Element ele = document.createElement("target"); Element ele = document.createElement("target");
ele.setAttribute("name", "prebuild"); ele.setAttribute("name", "prebuild");
@ -480,7 +480,7 @@ public class PlatformBuildFileGenerator {
// //
// User Extensions // User Extensions
// //
root.appendChild(document.createComment("Post Build Processing")); root.appendChild(document.createComment("Post-Build Processing"));
Element ele = document.createElement("target"); Element ele = document.createElement("target");
ele.setAttribute("name", "postbuild"); ele.setAttribute("name", "postbuild");

View File

@ -162,7 +162,7 @@ public class GlobalData {
// CONF dir + tools definition file name // CONF dir + tools definition file name
// //
File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename); File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);
System.out.println("Using file [" + toolsDefFile.getPath() + "] as tools definition file. "); System.out.println("Using tool definiton file [" + toolsDefFile.getPath() + "].");
toolsDef = new ToolChainConfig(toolsDefFile); toolsDef = new ToolChainConfig(toolsDefFile);
// //
@ -175,7 +175,7 @@ public class GlobalData {
// validate FrameworkDatabaseFile // validate FrameworkDatabaseFile
// //
if (! db.validate()) { if (! db.validate()) {
throw new BuildException("Framework Database file [" + dbFile.getPath() + "] is invalid."); throw new BuildException("Framework Database file [" + dbFile.getPath() + "] format is invalid!");
} }
// //
// Get package list // Get package list
@ -208,7 +208,7 @@ public class GlobalData {
// Verify FPD file, if is invalid, throw Exception // Verify FPD file, if is invalid, throw Exception
// //
if (! fpdDoc.validate()) { if (! fpdDoc.validate()) {
throw new BuildException("Framework Platform Surface Area file [" + fpdFile.getPath() + "] is invalid. "); throw new BuildException("Framework Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");
} }
// //
// We can change Map to XmlObject // We can change Map to XmlObject
@ -225,7 +225,7 @@ public class GlobalData {
} }
} }
} catch (Exception e) { } catch (Exception e) {
throw new BuildException("Parse workspace Database [" + dbFile.getPath() + "] Error.\n" + e.getMessage()); throw new BuildException("Parse WORKSPACE Database file [" + dbFile.getPath() + "] Error.\n" + e.getMessage());
} }
} }
@ -257,7 +257,7 @@ public class GlobalData {
} }
} }
if (msaFile == null){ if (msaFile == null){
throw new BuildException("Can't find Module [" + moduleId.getName() + "] in all packages. "); throw new BuildException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");
} }
else { else {
return msaFile; return msaFile;
@ -283,7 +283,7 @@ public class GlobalData {
} }
} }
if (packageId == null){ if (packageId == null){
throw new BuildException("Can't find Module [" + moduleId.getName() + "] in all packages. "); throw new BuildException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");
} }
else { else {
return packageId; return packageId;
@ -387,7 +387,7 @@ public class GlobalData {
public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException { public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException {
if (! msaFile.exists()) { if (! msaFile.exists()) {
throw new BuildException("Surface Area file [" + msaFile.getPath() + "] can't found."); throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] can't be found!");
} }
try { try {
ModuleSurfaceAreaDocument doc = (ModuleSurfaceAreaDocument)XmlObject.Factory.parse(msaFile); ModuleSurfaceAreaDocument doc = (ModuleSurfaceAreaDocument)XmlObject.Factory.parse(msaFile);
@ -395,7 +395,7 @@ public class GlobalData {
// Validate File if they accord with XML Schema // Validate File if they accord with XML Schema
// //
if ( ! doc.validate()){ if ( ! doc.validate()){
throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] is invalid."); throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] format is invalid!");
} }
// //
// parse MSA file // parse MSA file
@ -475,7 +475,7 @@ public class GlobalData {
// If can't find library class declaration in every package // If can't find library class declaration in every package
// //
throw new BuildException("Can not find library class [" + name throw new BuildException("Can not find library class [" + name
+ "] declaration in every packages. "); + "] declaration in any SPD package!");
} }
/** /**
@ -581,7 +581,7 @@ public class GlobalData {
return platformId; return platformId;
} }
} }
throw new BuildException("Can't find platform [" + name + "] in current workspace database. "); throw new BuildException("Can't find platform [" + name + "] in the current WORKSPACE database!");
} }
public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException { public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException {
@ -593,7 +593,7 @@ public class GlobalData {
return platformId; return platformId;
} }
} }
throw new BuildException("Can't find platform file [" + filename + "] in current workspace database. "); throw new BuildException("Can't find platform file [" + filename + "] in the current WORKSPACE database!");
} }
public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException { public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException {
@ -606,7 +606,7 @@ public class GlobalData {
return packageId; return packageId;
} }
} }
throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " under current workspace. "); throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
} }
public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException { public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {
@ -617,7 +617,7 @@ public class GlobalData {
moduleId.setPackage(packageId); moduleId.setPackage(packageId);
Spd spd = spdTable.get(packageId); Spd spd = spdTable.get(packageId);
if (spd == null) { if (spd == null) {
throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " under current workspace. "); throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
} }
Set<ModuleIdentification> modules = spd.getModules(); Set<ModuleIdentification> modules = spd.getModules();
Iterator<ModuleIdentification> iter = modules.iterator(); Iterator<ModuleIdentification> iter = modules.iterator();
@ -630,7 +630,7 @@ public class GlobalData {
return moduleId; return moduleId;
} }
} }
throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in " + packageId + " under current workspace. "); throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");
} }
public synchronized static Set<PackageIdentification> getPackageList(){ public synchronized static Set<PackageIdentification> getPackageList(){

View File

@ -90,7 +90,7 @@ public class OnDependency extends Task {
} else { } else {
File srcFile = new File(srcFileName); File srcFile = new File(srcFileName);
if (!srcFile.exists()) { if (!srcFile.exists()) {
throw new BuildException(srcFileName + " doesn't exist !!!"); throw new BuildException("Source File name: " + srcFileName + " doesn't exist!!!");
} }
srcTimeStamp = srcFile.lastModified(); srcTimeStamp = srcFile.lastModified();
timeStampCache.put(srcFileName, new Long(srcTimeStamp)); timeStampCache.put(srcFileName, new Long(srcTimeStamp));

View File

@ -93,7 +93,7 @@ public class Spd {
// If specified package file not exists // If specified package file not exists
// //
if ( ! packageFile.exists()) { if ( ! packageFile.exists()) {
throw new BuildException("Package file [" + packageFile.getPath() + "] not exists. "); throw new BuildException("Package file [" + packageFile.getPath() + "] does not exist!");
} }
try { try {
XmlObject spdDoc = XmlObject.Factory.parse(packageFile); XmlObject spdDoc = XmlObject.Factory.parse(packageFile);
@ -101,7 +101,7 @@ public class Spd {
// Verify SPD file, if is invalid, throw Exception // Verify SPD file, if is invalid, throw Exception
// //
if (! spdDoc.validate()) { if (! spdDoc.validate()) {
throw new BuildException("Package Surface Area file [" + packageFile.getPath() + "] is invalid. "); throw new BuildException("Package Surface Area file [" + packageFile.getPath() + "] format is invalid!");
} }
// We can change Map to XmlObject // We can change Map to XmlObject
Map<String, XmlObject> spdDocMap = new HashMap<String, XmlObject>(); Map<String, XmlObject> spdDocMap = new HashMap<String, XmlObject>();
@ -127,7 +127,7 @@ public class Spd {
moduleId.setPackage(packageId); moduleId.setPackage(packageId);
moduleId.setMsaFile(msaFile); moduleId.setMsaFile(msaFile);
if (msaInfo.containsKey(moduleId)) { if (msaInfo.containsKey(moduleId)) {
throw new BuildException("Find two modules with the same GUID and Version in " + packageId + ". They are [" + msaInfo.get(moduleId) + "] and [" + msaFile + "] "); throw new BuildException("Found two modules with the same GUID and Version in package " + packageId + ".\nThey are module [" + msaInfo.get(moduleId) + "] and MSA file [" + msaFile + "]!");
} }
msaInfo.put(moduleId, msaFile); msaInfo.put(moduleId, msaFile);
} }
@ -199,7 +199,7 @@ public class Spd {
} }
catch (Exception e) { catch (Exception e) {
e.setStackTrace(e.getStackTrace()); e.setStackTrace(e.getStackTrace());
throw new BuildException("Parse package description file [" + packageId.getSpdFile() + "] Error.\n" throw new BuildException("Parse of the package description file [" + packageId.getSpdFile() + "] failed!\n"
+ e.getMessage()); + e.getMessage());
} }
} }

View File

@ -63,7 +63,7 @@ public class VariableTask extends Task {
*/ */
public void execute() throws BuildException { public void execute() throws BuildException {
if (name == null || value == null) { if (name == null || value == null) {
throw new BuildException("Name or value must not null."); throw new BuildException("Name or value cannot be null.");
} }
getProject().setProperty(name, value); getProject().setProperty(name, value);
} }

View File

@ -171,7 +171,7 @@ public class PCDAutoGenAction extends BuildAction {
} }
ActionMessage.debug(this, ActionMessage.debug(this,
"PCD memory database contains " + dbManager.getDBSize() + " PCD tokens"); "PCD memory database contains " + dbManager.getDBSize() + " PCD tokens.");
generateAutogenForModule(); generateAutogenForModule();
} }
@ -228,9 +228,9 @@ public class PCDAutoGenAction extends BuildAction {
// All library's PCD should instanted in module's <ModuleSA> who // All library's PCD should instanted in module's <ModuleSA> who
// use this library instance. If not, give errors. // use this library instance. If not, give errors.
// //
throw new BuildActionException (String.format("Module %s use library instance %s, the PCD %s " + throw new BuildActionException (String.format("Module %s using library instance %s; the PCD %s " +
"is required by this library instance, but can not find " + "is required by this library instance, but can not be found " +
"it in the %s's <ModuleSA> in FPD file!", "in the %s's <ModuleSA> in the FPD file!",
MemoryDatabaseManager.CurrentModuleName, MemoryDatabaseManager.CurrentModuleName,
moduleName, moduleName,
pcdNameArrayInMsa[index], pcdNameArrayInMsa[index],

View File

@ -1326,7 +1326,7 @@ public class PcdDatabase {
case POINTER: case POINTER:
return "UINT8"; return "UINT8";
default: default:
throw new EntityException("Unknown type in getDataTypeCDeclaration"); throw new EntityException("Unknown DatumType in getDataTypeCDeclaration");
} }
} }
@ -1486,7 +1486,7 @@ public class PcdDatabase {
retStr = retStr +"\r\n" + str; retStr = retStr +"\r\n" + str;
} }
} catch (Exception ex) { } catch (Exception ex) {
throw new EntityException("Fatal error when generating PcdDatabase Common Definitions"); throw new EntityException("Fatal error when generating PcdDatabase Common Definitions!");
} }
return retStr; return retStr;
@ -1509,7 +1509,7 @@ public class PcdDatabase {
retStr = retStr +"\r\n" + str; retStr = retStr +"\r\n" + str;
} }
} catch (Exception ex) { } catch (Exception ex) {
throw new EntityException("Fatal error when generating PcdDatabase Dxe Definitions"); throw new EntityException("Fatal error when generating PcdDatabase Dxe Definitions!");
} }
return retStr; return retStr;
@ -1532,7 +1532,7 @@ public class PcdDatabase {
retStr = retStr +"\r\n" + str; retStr = retStr +"\r\n" + str;
} }
} catch (Exception ex) { } catch (Exception ex) {
throw new EntityException("Fatal error when generating PcdDatabase Pei Definitions"); throw new EntityException("Fatal error when generating PcdDatabase Pei Definitions!");
} }
return retStr; return retStr;
@ -1585,7 +1585,7 @@ public class PcdDatabase {
if ((uuidString.charAt(0) == '0') && ((uuidString.charAt(1) == 'x') || (uuidString.charAt(1) == 'X'))) { if ((uuidString.charAt(0) == '0') && ((uuidString.charAt(1) == 'x') || (uuidString.charAt(1) == 'X'))) {
splitStringArray = uuidString.split("," ); splitStringArray = uuidString.split("," );
if (splitStringArray.length != 11) { if (splitStringArray.length != 11) {
throw new EntityException ("[FPD file error] Wrong format for UUID string: " + uuidString); throw new EntityException ("[FPD file error] Wrong format for GUID string: " + uuidString);
} }
// //
@ -1626,4 +1626,4 @@ public class PcdDatabase {
return UUID.fromString(uuidString); return UUID.fromString(uuidString);
} }
} }

View File

@ -121,7 +121,7 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
**/ **/
public void execute() throws PlatformPcdPreprocessBuildException { public void execute() throws PlatformPcdPreprocessBuildException {
String errorMessageHeader = "Fail to initialize Pcd memory database for building. Because:"; String errorMessageHeader = "Failed to initialize the Pcd memory database because: ";
String errorsForPreprocess = null; String errorsForPreprocess = null;
// //
@ -170,7 +170,7 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
try { try {
tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(guidCName); tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(guidCName);
} catch ( Exception e ) { } catch ( Exception e ) {
throw new PlatformPcdPreprocessException ("Failed get Guid CName " + guidCName + "from SPD file!"); throw new PlatformPcdPreprocessException ("Failed to get Guid CName " + guidCName + " from the SPD file!");
} }
return tokenSpaceStrRet; return tokenSpaceStrRet;
} }
@ -303,8 +303,8 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
dynamicPcdBuildDefinitions = fpdDocInstance.getPlatformSurfaceArea().getDynamicPcdBuildDefinitions(); dynamicPcdBuildDefinitions = fpdDocInstance.getPlatformSurfaceArea().getDynamicPcdBuildDefinitions();
if (dynamicPcdBuildDefinitions == null) { if (dynamicPcdBuildDefinitions == null) {
exceptionString = String.format("[FPD file error] There are no <PcdDynamicBuildDescriptions> in FPD file but contains Dynamic type "+ exceptionString = String.format("[FPD file error] There are no <PcdDynamicBuildDescriptions> elements in FPD file but there are Dynamic type "+
"PCD entry %s in module %s!", "PCD entries %s in module %s!",
token.cName, token.cName,
moduleName); moduleName);
putError(exceptionString); putError(exceptionString);
@ -374,11 +374,11 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
File file = null; File file = null;
if (fpdFilePath == null) { if (fpdFilePath == null) {
throw new PlatformPcdPreprocessBuildException("WorkspacePath and FPDFileName should be blank for CollectPCDAtion!"); throw new PlatformPcdPreprocessBuildException("WorkspacePath and FPDFileName should be empty for CollectPCDAtion!");
} }
if (fpdFilePath.length() == 0) { if (fpdFilePath.length() == 0) {
throw new PlatformPcdPreprocessBuildException("WorkspacePath and FPDFileName should be blank for CollectPCDAtion!"); throw new PlatformPcdPreprocessBuildException("WorkspacePath and FPDFileName should be empty for CollectPCDAtion!");
} }
file = new File(fpdFilePath); file = new File(fpdFilePath);

View File

@ -89,7 +89,7 @@ public class ConfigReader {
valueList.add(str.substring(index + 1).trim()); valueList.add(str.substring(index + 1).trim());
} }
} catch (Exception e) { } catch (Exception e) {
throw new EdkException("Process file [" + filename + "] error. \n" + e.getMessage()); throw new EdkException("ERROR Processing file [" + filename + "].\n" + e.getMessage());
} }
String[][] definitions = new String[2][keyList.size()]; String[][] definitions = new String[2][keyList.size()];
@ -126,7 +126,7 @@ public class ConfigReader {
map.put(key, value); map.put(key, value);
} }
} catch (Exception e) { } catch (Exception e) {
throw new EdkException("Process file [" + ConfigFile.getAbsolutePath() + "] error. \n" + e.getMessage()); throw new EdkException("ERROR Processing file [" + ConfigFile.getAbsolutePath() + "].\n" + e.getMessage());
} }
return map; return map;