Package org.apache.cocoon.treeprocessor

Examples of org.apache.cocoon.treeprocessor.InvokeContext


    }
   
    private boolean invokeErrorHandler(ProcessingNode node, Exception ex, Environment env)
      throws Exception {

        InvokeContext errorContext = null;
       
        try {
            // Try to reset the response to avoid mixing already produced output
            // and error page.
            env.tryResetResponse();
           
            // Build a new context
            errorContext = new InvokeContext();
            errorContext.compose(this.manager);
           
            // Create a Notifying
            NotifyingBuilder notifyingBuilder= (NotifyingBuilder)this.manager.lookup(NotifyingBuilder.ROLE);
            Notifying currentNotifying = notifyingBuilder.build(this, ex);
            this.manager.release(notifyingBuilder);
           
            // Add it to the object model
            env.getObjectModel().put(Constants.NOTIFYING_OBJECT, currentNotifying );

            // notifying-generator is added in HandleErrorsNode
            return node.invoke(env, errorContext);
           
        } catch (Exception subEx) {
            getLogger().error("error notifier barfs", subEx);
            return false;
           
        } finally {
            if (errorContext != null) {
                errorContext.dispose();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.treeprocessor.InvokeContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.