xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spepp...@apache.org
Subject svn commit: r1003775 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
Date Sat, 02 Oct 2010 11:38:37 GMT
Author: spepping
Date: Sat Oct  2 11:38:37 2010
New Revision: 1003775

URL: http://svn.apache.org/viewvc?rev=1003775&view=rev
Log:
Make handling of configuration errors consistent

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=1003775&r1=1003774&r2=1003775&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Sat Oct
 2 11:38:37 2010
@@ -93,19 +93,6 @@ public class FopFactoryConfigurator {
      * @throws FOPException fop exception
      */
     public void configure(FopFactory factory) throws FOPException {
-        if (log.isDebugEnabled()) {
-            log.debug("Initializing FopFactory Configuration");
-        }
-
-        if (cfg.getChild("accessibility", false) != null) {
-            try {
-                this.factory.setAccessibility(
-                        cfg.getChild("accessibility").getValueAsBoolean());
-            } catch (ConfigurationException e) {
-                throw new FOPException(e);
-            }
-        }
-
         // strict configuration
         if (cfg.getChild("strict-configuration", false) != null) {
             try {
@@ -116,6 +103,19 @@ public class FopFactoryConfigurator {
             }
         }
         boolean strict = factory.validateUserConfigStrictly();
+        if (log.isDebugEnabled()) {
+            log.debug("Initializing FopFactory Configuration"
+                      + "with " + (strict?"strict":"permissive") + " validation");
+        }
+
+        if (cfg.getChild("accessibility", false) != null) {
+            try {
+                this.factory.setAccessibility(
+                        cfg.getChild("accessibility").getValueAsBoolean());
+            } catch (ConfigurationException e) {
+                LogUtil.handleException(log, e, strict);
+            }
+        }
 
         // strict fo validation
         if (cfg.getChild("strict-validation", false) != null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message