You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2004/01/19 09:43:16 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap PipelineNode.java
antonio 2004/01/19 00:43:16
Modified: src/java/org/apache/cocoon/components/treeprocessor/sitemap
PipelineNode.java
Log:
Move error to the end + fix typo
Revision Changes Path
1.11 +9 -15 cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PipelineNode.java
Index: PipelineNode.java
===================================================================
RCS file: /home/cvs//cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PipelineNode.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- PipelineNode.java 24 Sep 2003 21:41:11 -0000 1.10
+++ PipelineNode.java 19 Jan 2004 08:43:16 -0000 1.11
@@ -152,42 +152,37 @@
boolean externalRequest = env.isExternal();
- // Always fail on external resquests if internal only.
+ // Always fail on external request if pipeline is internal only.
if (this.internalOnly && externalRequest) {
return false;
}
-
- context.inform(this.processingPipeline, this.parameters, env.getObjectModel());
-
+ context.inform(this.processingPipeline, this.parameters,
+ env.getObjectModel());
try {
if (invokeNodes(children, env, context)) {
return true;
- } else if (this.isLast) {
- String msg = "No pipeline matched request: " + env.getURIPrefix() + env.getURI();
- throw new ResourceNotFoundException(msg);
- } else {
+ } else if (!this.isLast) {
return false;
+ } else {
+ throw new ResourceNotFoundException(
+ "No pipeline matched request: " + env.getURIPrefix()
+ + env.getURI());
}
} catch (ConnectionResetException cre) {
// Will be reported by CocoonServlet, rethrowing
throw cre;
-
} catch (Exception ex) {
-
if (!externalRequest) {
// Propagate exception on internal requests
throw ex;
-
} else if (error404 != null && ex instanceof ResourceNotFoundException) {
// Invoke 404-specific handler
handledErrorsLogger.error(ex.getMessage(), ex);
return errorHandlerHelper.invokeErrorHandler(error404, ex, env);
-
} else if (error500 != null) {
// Invoke global handler
handledErrorsLogger.error(ex.getMessage(), ex);
return errorHandlerHelper.invokeErrorHandler(error500, ex, env);
-
} else {
// No handler : propagate
throw ex;
@@ -195,4 +190,3 @@
}
}
}
-