cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r330021 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
Date Tue, 01 Nov 2005 10:37:31 GMT
Author: sylvain
Date: Tue Nov  1 02:37:24 2005
New Revision: 330021

URL: http://svn.apache.org/viewcvs?rev=330021&view=rev
Log:
Why does SourceUtil convert SNFE in RNFE ????

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java?rev=330021&r1=330020&r2=330021&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java Tue
Nov  1 02:37:24 2005
@@ -291,17 +291,27 @@
             newValues = Collections.EMPTY_MAP;
 
         } catch (ResourceNotFoundException e) {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().info("Bundle <" + sourceURI + "> not loaded: Source URI
not found", e);
-            } else if (getLogger().isInfoEnabled()) {
-                getLogger().info("Bundle <" + sourceURI + "> not loaded: Source URI
not found");
+            // FIXME: this damn SourceUtil converts SNFE to RNFE!!!
+            if (getLogger().isInfoEnabled()) {
+                if (newSource != null && !newSource.exists()) {
+                    // Nominal case where a bundle doesn't exist: log the message but not
the exception
+                    getLogger().info("Bundle <" + sourceURI + "> not loaded: Source
URI not found");
+                } else {
+                    // Log the exception
+                    getLogger().info("Bundle <" + sourceURI + "> not loaded: Source
URI not found", e);
+                }
             }
             newValues = Collections.EMPTY_MAP;
 
         } catch (SourceNotFoundException e) {
-            // Nominal case where a bundle doesn't exist
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Bundle <" + sourceURI + "> not loaded: Source URI
not found");
+            if (getLogger().isInfoEnabled()) {
+                if (newSource != null && !newSource.exists()) {
+                    // Nominal case where a bundle doesn't exist: log the message but not
the exception
+                    getLogger().info("Bundle <" + sourceURI + "> not loaded: Source
URI not found");
+                } else {
+                    // Log the exception
+                    getLogger().info("Bundle <" + sourceURI + "> not loaded: Source
URI not found", e);
+                }
             }
             newValues = Collections.EMPTY_MAP;
 



Mime
View raw message