aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-07-09 17:04:05 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-07-09 17:04:05 +0000
commitf7c6c8a1896c7871a87cf0d83aac1debfd99e833 (patch)
tree197da9928599eea2a9dc733b39388e72cc34ec61 /src/java/org/apache/fop
parentb0233b35268c4f9bb1f26c0dc4c3673b951c3cd1 (diff)
downloadxmlgraphics-fop-f7c6c8a1896c7871a87cf0d83aac1debfd99e833.tar.gz
xmlgraphics-fop-f7c6c8a1896c7871a87cf0d83aac1debfd99e833.zip
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. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@675257 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/tools/anttasks/Fop.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/tools/anttasks/Fop.java b/src/java/org/apache/fop/tools/anttasks/Fop.java
index 6f9b2fc34..0f28d70e7 100644
--- a/src/java/org/apache/fop/tools/anttasks/Fop.java
+++ b/src/java/org/apache/fop/tools/anttasks/Fop.java
@@ -77,6 +77,7 @@ public class Fop extends Task {
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 @@ public class Fop extends Task {
}
/**
+ * 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 @@ class FOPTaskStarter {
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();