You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Danno Ferrin <DF...@novell.com> on 1999/11/13 22:59:39 UTC

JSP1.1pr2 sec 5.7.3 and the handling of thrown errors

5.7.3 specifies that a JspError can be thrown by a taghandler class can thrown by a taghandler if there is some sort of error at action time is discovered.  This section also states it is either the page itself or the errorPage directive that will  handle this exception.

The compiler is currently written tightly around taglibs to make all errors loudly ignored.  These sections are wrapped in catch (Throwable t) try blocks.  

Solutions are either to get rid of the try blocks (static typing would guarantee all exceptions being thrown out are of type Error, RuntimeException, or JspError) or to add in front of the catch (Throwable t) sections a block catch (JspError je) {throw je;}, which would still trip the finally block but still let it be thrown out of the page.  The first solution also has the side effect of solving the verifier error as well.




Re: JSP1.1pr2 sec 5.7.3 and the handling of thrown errors

Posted by "Anil K. Vijendran" <An...@eng.sun.com>.
Hi Danno,

Yes, I know that is a bug and needs to be removed. I think I have some comments in there to that effect. It was just there for development purposes.

Will remove it as soon as I get a chance. BTW, AFAIK, JspError was changed to JspTagException.

Danno Ferrin wrote:

> 5.7.3 specifies that a JspError can be thrown by a taghandler class can thrown by a taghandler if there is some sort of error at action time is discovered.  This section also states it is either the page itself or the errorPage directive that will  handle this exception.
>
> The compiler is currently written tightly around taglibs to make all errors loudly ignored.  These sections are wrapped in catch (Throwable t) try blocks.
>
> Solutions are either to get rid of the try blocks (static typing would guarantee all exceptions being thrown out are of type Error, RuntimeException, or JspError) or to add in front of the catch (Throwable t) sections a block catch (JspError je) {throw je;}, which would still trip the finally block but still let it be thrown out of the page.  The first solution also has the side effect of solving the verifier error as well.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
Peace, Anil +<:-)