From module build, exception from module surface area invalid.\r
**/\r
public void execute() throws BuildException {\r
+ this.setTaskName("GenBuild");\r
try {\r
processGenBuild();\r
} catch (PcdAutogenException e) {\r
Map<String, XmlObject> doc = GlobalData.getNativeMsa(msaFile);\r
saq = new SurfaceAreaQuery(doc);\r
moduleId = saq.getMsaHeader();\r
+ moduleId.setMsaFile(msaFile);\r
}\r
\r
String[] producedLibraryClasses = saq.getLibraryClasses("ALWAYS_PRODUCED",null);\r
private void prepareSingleModuleBuild() throws EdkException {\r
//\r
// Find out the package which the module belongs to\r
- // TBD: Enhance it!!!!\r
//\r
PackageIdentification packageId = GlobalData.getPackageForModule(moduleId);\r
GlobalData.refreshPackageIdentification(packageId);\r
import java.io.BufferedWriter;\r
import java.io.File;\r
import java.io.FileWriter;\r
+import java.io.IOException;\r
import java.util.HashMap;\r
import java.util.Iterator;\r
import java.util.LinkedHashMap;\r
import org.apache.tools.ant.Task;\r
import org.apache.tools.ant.taskdefs.Ant;\r
import org.apache.tools.ant.taskdefs.Property;\r
+import org.apache.xmlbeans.XmlException;\r
import org.apache.xmlbeans.XmlObject;\r
\r
import org.tianocore.common.definitions.EdkDefinitions;\r
bw.flush();\r
bw.close();\r
fw.close();\r
- } catch (Exception e) {\r
- throw new BuildException("Generation of the FV file [" + fvFile.getPath() + "] failed!\n" + e.getMessage());\r
+ } catch (IOException ex) {\r
+ BuildException buildException = new BuildException("Generation of the FV file [" + fvFile.getPath() + "] failed!\n" + ex.getMessage());\r
+ buildException.setStackTrace(ex.getStackTrace());\r
+ throw buildException;\r
}\r
}\r
}\r
@throws BuildException\r
FPD file is not valid.\r
**/\r
- public void parseFpdFile(File fpdFile) throws BuildException {\r
+ public void parseFpdFile(File fpdFile) throws BuildException, EdkException {\r
this.fpdFile = fpdFile;\r
parseFpdFile();\r
}\r
//\r
PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
ca.perform(platformId.getFpdFile().getPath(), ActionMessage.NULL_MESSAGE_LEVEL);\r
- } catch (Exception e) {\r
- throw new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + e.getMessage());\r
+ } catch (IOException ex) {\r
+ BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
+ buildException.setStackTrace(ex.getStackTrace());\r
+ throw buildException;\r
+ } catch (XmlException ex) {\r
+ BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
+ buildException.setStackTrace(ex.getStackTrace());\r
+ throw buildException;\r
+ } catch (EdkException ex) {\r
+ BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
+ buildException.setStackTrace(ex.getStackTrace());\r
+ throw buildException;\r
}\r
}\r
\r
//\r
PackageIdentification pkgId = new PackageIdentification(null, pkgGuid, pkgVersion);\r
GlobalData.refreshPackageIdentification(pkgId);\r
+ \r
ModuleIdentification saId = new ModuleIdentification(null, saGuid, saVersion);\r
+ saId.setPackage(pkgId);\r
GlobalData.refreshModuleIdentification(saId);\r
\r
- saId.setPackage(pkgId);\r
+\r
\r
//\r
// Create FpdModule Identification which have class member of module\r