Author: rgardler
Date: Fri Dec  9 06:50:30 2005
New Revision: 355508

URL: http://svn.apache.org/viewcvs?rev=355508&view=rev
Log:
The locationmap module now throws and exception if a null is returned. This is 
logged in the error.log file. We should really create a custom exception type 
for better filtering of the log, but this is a start.

(interestingly it has turned up a few problems with the current lm useage)

Unfortunately we still fail with "access denied" (this is a Cocoon issue) but 
at least our logs now tell us something meaningful.

(partial fix for FOR-701)


Modified:
    forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java

Modified: 
forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java?rev=355508&r1=355507&r2=355508&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java 
(original)
+++ forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java 
Fri Dec  9 06:50:30 2005
@@ -282,8 +282,9 @@
         
         ContainerUtil.dispose(context);
 
-        if (getLogger().isDebugEnabled() && location == null) {
-            getLogger().debug("No location matched request with hint " + hint);
+        if (location == null) {
+            getLogger().error(msg);;
+            throw new Exception(msg);
         }
 
         return location;


Reply via email to