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