Author: acumiskey
Date: Wed Jul 9 10:04:05 2008
New Revision: 675257
URL: http://svn.apache.org/viewvc?rev=675257&view=rev
Log:
Merged revisions 675253 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r675253 | acumiskey | 2008-07-09 17:53:01 +0100 (Wed, 09 Jul 2008) | 2 lines
Added throwexceptions attribute to FOP ant task. This works around the
problem with executing examples/fo/build.xml.
........
Modified:
xmlgraphics/fop/branches/Temp_AFPGOCAResources/ (props changed)
xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/fo/build.xml
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/anttask.xml
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/tools/anttasks/Fop.java
Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 9 10:04:05 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-675246
+/xmlgraphics/fop/trunk:1-675256
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/fo/build.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/fo/build.xml?rev=675257&r1=675256&r2=675257&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/fo/build.xml
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/examples/fo/build.xml Wed
Jul 9 10:04:05 2008
@@ -45,7 +45,7 @@
<!-- 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>
Modified:
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/anttask.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/anttask.xml?rev=675257&r1=675256&r2=675257&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/anttask.xml
(original)
+++
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/trunk/anttask.xml
Wed Jul 9 10:04:05 2008
@@ -148,6 +148,11 @@
(<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>
Modified:
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/tools/anttasks/Fop.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/tools/anttasks/Fop.java?rev=675257&r1=675256&r2=675257&view=diff
==============================================================================
---
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/tools/anttasks/Fop.java
(original)
+++
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/tools/anttasks/Fop.java
Wed Jul 9 10:04:05 2008
@@ -77,6 +77,7 @@
private boolean logFiles = true;
private boolean force = false;
private boolean relativebase = false;
+ private boolean throwExceptions = false;
/**
* Sets the filename for the userconfig.xml.
@@ -212,6 +213,24 @@
}
/**
+ * 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)
*/
@@ -558,7 +577,10 @@
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();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]