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