In Tapestry 4.0 theres a service you can override that controls
exception reporting.

http://jakarta.apache.org/tapestry/tapestry/hivedocs/service/tapestry.error.ExceptionPresenter.html

You can see how this is integrated into the rest of the framework:

http://jakarta.apache.org/tapestry/tapestry/hivedocs/module/tapestry.error.html

 <property name="exceptionPresenter" object="service:ExceptionPresenter" />

By contributing a like service to tapestry.InfrastructureOverrides you
can get precise control over exceptions.

On 8/15/05, Paul Cantrell <[EMAIL PROTECTED]> wrote:
> I'd like to place a hook in Tapestry to know when a request fails, so
> that I can:
> 
>      (1) roll back my transaction,
>      (2) send an email to the administrator, and
>      (3) show a user-friendly error page.
> 
> I'd normally do this through my web.xml (servlet filter + error page
> descriptor), but Tapestry swallows exceptions and doesn't pass them
> to the container. Of course this makes sense in my dev environment --
> I *want* the very helpful error reporting! -- but not in production.
> And even in dev, I still want the rollback.
> 
> So what is the right point to hook in this custom error handling?
> 
> It seems that I can create an "Exception" page. That addresses (3),
> but what about (1) and (2)? Do I make the Exception page class
> implement PageAttachListener or PageBeginRenderListener and do
> rollback & email there ... or is that just a hack?
> 
> What is the best-practice approach here?
> 
> Cheers,
> 
> Paul
> 
> _________________________________________________________________
> 
> "Verbing weirds language."  -- Bill Watterson
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to