Author: apetrelli
Date: Thu Mar 1 08:35:45 2007
New Revision: 513398
URL: http://svn.apache.org/viewvc?view=rev&rev=513398
Log:
Now if a class is not present, the exception will simply logged.
Modified:
tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/context/ChainedTilesContextFactory.java
Modified:
tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/context/ChainedTilesContextFactory.java
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/context/ChainedTilesContextFactory.java?view=diff&rev=513398&r1=513397&r2=513398
==============================================================================
---
tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/context/ChainedTilesContextFactory.java
(original)
+++
tiles/framework/trunk/tiles-core/src/main/java/org/apache/tiles/context/ChainedTilesContextFactory.java
Thu Mar 1 08:35:45 2007
@@ -22,6 +22,8 @@
package org.apache.tiles.context;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.tiles.TilesApplicationContext;
import org.apache.tiles.context.TilesRequestContext;
@@ -41,6 +43,8 @@
"org.apache.tiles.context.servlet.ServletTilesContextFactory",
"org.apache.tiles.context.portlet.PortletTilesContextFactory",
"org.apache.tiles.context.jsp.JspTilesContextFactory" };
+
+ private static Log LOG =
LogFactory.getLog(ChainedTilesContextFactory.class);
private TilesContextFactory[] factories;
@@ -67,9 +71,9 @@
+ " does not implement TilesContextFactory");
}
} catch (ClassNotFoundException e) {
- throw new IllegalArgumentException(
- "Cannot find TilesContextFactory class "
- + classNames[i], e);
+ // We log it, because it could be a default configuration
class that
+ // is simply not present.
+ LOG.warn("Cannot find TilesContextFactory class "+
classNames[i], e);
} catch (InstantiationException e) {
throw new IllegalArgumentException(
"Cannot instantiate TilesFactoryClass " +
classNames[i],