Package railo.runtime.ext.tag

Source Code of railo.runtime.ext.tag.BodyTagTryCatchFinallySupport

package railo.runtime.ext.tag;

import javax.servlet.jsp.tagext.TryCatchFinally;

import railo.loader.engine.CFMLEngineFactory;
import railo.runtime.exp.PageServletException;
import railo.runtime.util.Excepton;


/**
* extends Body Support Tag eith TryCatchFinally Functionality
*/
public abstract class BodyTagTryCatchFinallySupport extends BodyTagSupport implements TryCatchFinally {

    /**
     * @see javax.servlet.jsp.tagext.TryCatchFinally#doCatch(java.lang.Throwable)
     */
    public void doCatch(Throwable t) throws Throwable {
        if(t instanceof PageServletException) {
            PageServletException pse=(PageServletException)t;
            t=pse.getPageException();
        }
        if(bodyContent!=null) {
            Excepton util = CFMLEngineFactory.getInstance().getExceptionUtil();
            if(util.isOfType(Excepton.TYPE_ABORT,t)) {
                bodyContent.writeOut(bodyContent.getEnclosingWriter());
            }
            bodyContent.clearBuffer();
        }
        throw t;
    }

    /**
     * @see javax.servlet.jsp.tagext.TryCatchFinally#doFinally()
     */
    public void doFinally() {
       
    }
   
}
TOP

Related Classes of railo.runtime.ext.tag.BodyTagTryCatchFinallySupport

TOP
Copyright © 2018 www.massapi.com. 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.