cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r606542 - in /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor: InvokeContext.java sitemap/ErrorHandlerHelper.java
Date Sun, 23 Dec 2007 05:48:43 GMT
Author: vgritsenko
Date: Sat Dec 22 21:48:25 2007
New Revision: 606542

URL: http://svn.apache.org/viewvc?rev=606542&view=rev
Log:
Fix bug in processing internal errors. Once errorContext is filled in
with built processing pipeline details, propagate this information into
current invocation context.

Modified:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java?rev=606542&r1=606541&r2=606542&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java
Sat Dec 22 21:48:25 2007
@@ -102,21 +102,29 @@
      * the current request is external.
      */
     public InvokeContext() {
-        this.isBuildingPipelineOnly = false;
     }
 
     /**
-     * Determines if the Pipeline been set for this context
+     * Create an <code>InvokeContext</code>
      */
-    public boolean pipelineIsSet() {
-	    return this.processingPipeline != null;
+    public InvokeContext(boolean isBuildingPipelineOnly) {
+        this.isBuildingPipelineOnly = isBuildingPipelineOnly;
     }
 
     /**
-     * Create an <code>InvokeContext</code>
+     * Create an <code>InvokeContext</code> based on existing context.
      */
-    public InvokeContext(boolean isBuildingPipelineOnly) {
-        this.isBuildingPipelineOnly = isBuildingPipelineOnly;
+    public InvokeContext(InvokeContext context) {
+        this.isBuildingPipelineOnly = context.isBuildingPipelineOnly;
+        this.redirector = context.redirector;
+        this.lastProcessor = context.lastProcessor;
+    }
+
+    /**
+     * Determines if the Pipeline been set for this context
+     */
+    public boolean pipelineIsSet() {
+	    return this.processingPipeline != null;
     }
 
     /**

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java?rev=606542&r1=606541&r2=606542&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/ErrorHandlerHelper.java
Sat Dec 22 21:48:25 2007
@@ -103,7 +103,7 @@
     throws Exception {
         final Processor.InternalPipelineDescription desc = prepareErrorHandler(ex, env, context);
         if (desc != null) {
-            desc.release();
+            context.setInternalPipelineDescription(desc);
             return true;
         }
 
@@ -151,7 +151,7 @@
     throws Exception {
         final Processor.InternalPipelineDescription desc = prepareErrorHandler(node, ex,
env, context);
         if (desc != null) {
-            desc.release();
+            context.setInternalPipelineDescription(desc);
             return true;
         }
 
@@ -181,8 +181,7 @@
             prepare(context, env, ex);
 
             // Create error context
-            InvokeContext errorContext = new InvokeContext(context.isBuildingPipelineOnly());
-            errorContext.setRedirector(context.getRedirector());
+            InvokeContext errorContext = new InvokeContext(context);
             errorContext.service(this.manager);
             errorContext.inform(context.getPipelineType(), context.getPipelineParameters(),
env.getObjectModel());
             try {



Mime
View raw message