cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r606540 - /cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
Date Sun, 23 Dec 2007 05:44:55 GMT
Author: vgritsenko
Date: Sat Dec 22 21:44:54 2007
New Revision: 606540

URL: http://svn.apache.org/viewvc?rev=606540&view=rev
Log:
simplify

Modified:
    cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java?rev=606540&r1=606539&r2=606540&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
(original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
Sat Dec 22 21:44:54 2007
@@ -488,24 +488,24 @@
      */
     protected void prepareInternalErrorHandler(Environment environment, ProcessingException
ex)
     throws ProcessingException {
-        if (this.errorHandler != null) {
-            try {
-                this.errorPipeline = this.errorHandler.prepareErrorPipeline(ex);
-                if (this.errorPipeline != null) {
-                    this.errorPipeline.prepareInternal(environment);
-                    return;
-                }
-            } catch (ProcessingException e) {
-                // Log the original exception
-                getLogger().error("Failed to process error handler for exception", ex);
-                throw e;
-            } catch (Exception e) {
-                getLogger().error("Failed to process error handler for exception", ex);
-                throw new ProcessingException("Failed to handle exception <" + ex.getMessage()
+ ">", e);
-            }
-        } else {
+        if (this.errorHandler == null) {
             // propagate exception if we have no error handler
             throw ex;
+        }
+
+        try {
+            this.errorPipeline = this.errorHandler.prepareErrorPipeline(ex);
+            if (this.errorPipeline != null) {
+                this.errorPipeline.prepareInternal(environment);
+            }
+        } catch (ProcessingException e) {
+            // Log the original exception
+            getLogger().error("Failed to process error handler for exception", ex);
+            throw e;
+        } catch (Exception e) {
+            // Log the original exception
+            getLogger().error("Failed to process error handler for exception", ex);
+            throw new ProcessingException("Failed to handle exception <" + ex.getMessage()
+ ">", e);
         }
     }
 



Mime
View raw message