You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2007/12/23 06:44:55 UTC
svn commit: r606540 -
/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
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);
}
}