Return-Path: Delivered-To: apmail-xmlgraphics-fop-commits-archive@www.apache.org Received: (qmail 75382 invoked from network); 2 Oct 2010 11:39:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Oct 2010 11:39:01 -0000 Received: (qmail 69581 invoked by uid 500); 2 Oct 2010 11:39:01 -0000 Delivered-To: apmail-xmlgraphics-fop-commits-archive@xmlgraphics.apache.org Received: (qmail 69504 invoked by uid 500); 2 Oct 2010 11:38:59 -0000 Mailing-List: contact fop-commits-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: fop-dev@xmlgraphics.apache.org Delivered-To: mailing list fop-commits@xmlgraphics.apache.org Received: (qmail 69497 invoked by uid 99); 2 Oct 2010 11:38:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 11:38:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 11:38:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B05B5238890D; Sat, 2 Oct 2010 11:38:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003775 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Date: Sat, 02 Oct 2010 11:38:37 -0000 To: fop-commits@xmlgraphics.apache.org From: spepping@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101002113837.B05B5238890D@eris.apache.org> 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