<!-- Produces new test files (function) -->
<!-- =================================================================== -->
<target name="newTestFiles">
- <fop format="${mimetype}" outdir="${outDir}" messagelevel="${msglevel}" relativebase="true">
+ <fop format="${mimetype}" outdir="${outDir}" messagelevel="${msglevel}" relativebase="true" throwexceptions="false">
<fileset dir="basic">
<include name="**/*.fo"/>
</fileset>
(<code>true</code>) or not (<code>false</code>). <strong>Currently doesn't work in FOP Trunk!!!</strong></td>
<td>No, default is <code>true</code></td>
</tr>
+ <tr>
+ <td>throwexceptions</td>
+ <td>Controls whether or not an exception is thrown if an error occurs during rendering.</strong></td>
+ <td>Default is <code>true</code></td>
+ </tr>
</table>
<p/>
<table><caption>Parameters specified as nested elements</caption>
private boolean logFiles = true;
private boolean force = false;
private boolean relativebase = false;
+ private boolean throwExceptions = false;
/**
* Sets the filename for the userconfig.xml.
return this.format;
}
+ /**
+ * Set whether exceptions are thrown.
+ * default is false.
+ *
+ * @param force true if always generate.
+ */
+ public void setThrowexceptions(boolean throwExceptions) {
+ this.throwExceptions = throwExceptions;
+ }
+
+ /**
+ * Gets the throw exceptions attribute
+ * @return the throw exceptions attribute
+ */
+ public boolean getThrowexceptions() {
+ return this.throwExceptions;
+ }
+
/**
* Sets the message level to be used while processing.
* @param messageLevel (error | warn| info | verbose | debug)
inputHandler.renderTo(userAgent, outputFormat, out);
success = true;
} catch (Exception ex) {
- throw new BuildException(ex);
+ if (task.getThrowexceptions()) {
+ throw new BuildException(ex);
+ }
+ logger.error("Error rendering fo file: " + foFile, ex);
} finally {
try {
out.close();