You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Elankath, Tarun (Cognizant)" <ET...@blr.cognizant.com> on 2003/02/25 09:57:12 UTC

A way to deal with system errors ?

Hi

Many pages in my application have get/set methods that throw exceptions. Is there a way to delegate these to the engine (or some other object), so that the default error page comes up in case of an error ?

Right now I am having try-catch blocks around each such method in a page.

Thanks for a tip,
Tarun

RE: A way to deal with system errors ?

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
That should be exactly what happens today.  If your accesor throws an
exception (runtime or normal), it is caught by the binding object and
rethrown as an ApplicationRuntimeException which percolates up to
AbstractEngine.service() and is reported using the standard exception page.
If this is not the case, I'd be curious to see the details.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Elankath, Tarun (Cognizant) [mailto:ETarun@blr.cognizant.com] 
> Sent: Tuesday, February 25, 2003 3:57 AM
> To: tapestry-user@jakarta.apache.org
> Subject: A way to deal with system errors ?
> 
> 
> Hi
> 
> Many pages in my application have get/set methods that throw 
> exceptions. Is there a way to delegate these to the engine 
> (or some other object), so that the default error page comes 
> up in case of an error ?
> 
> Right now I am having try-catch blocks around each such 
> method in a page.
> 
> Thanks for a tip,
> Tarun
>