You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <p....@albourne.com> on 2008/02/25 10:32:41 UTC

Tapestry 5 Error handling

Hi All,

I would like your opinions on best practices for error handling.

This is how I currently deal with errors:
- I use the ExceptionReporter to override the default Tapestry exception 
page
- I implement a small Tapestry service wired to the 
ApplicationStateManager deal with errors, which also allows me to do 
some additional error reporting of user info

* Should I be using a RequestFilter/Dispatcher for exceptions?
* Should I use the onException Tapestry event method in my layout/border 
component?

I would also like to override server error pages (404, 500 etc...) for 
uncaught server exceptions but at the moment I cant get this to work 
right with Tapestry, I would love to hear your ideas.

Thanks
Peter






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 Error handling

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Just goes to show how awesome Tapestry 5 is. :)

-Filip

Peter Stavrinides skrev:
> Hi Filip,
> 
> That's clever!, definitely worth looking into, I could modify my service 
> quite easily, thanks for your comment !
> 
> Filip S. Adamsen wrote:
>> Hi Peter,
>>
>> I've turned the RequestExceptionHandler service into a pipeline, which 
>> seems to work quite well for my applications. I inject the 
>> DefaultRequestExceptionHandler and use it as the terminator in the 
>> pipeline, that way the old behaviour is preserved if no filters are 
>> added to the pipeline.
>>
>> It works very well for me.
>>
>> -Filip
>>
>> Peter Stavrinides skrev:
>>> Hi All,
>>>
>>> I would like your opinions on best practices for error handling.
>>>
>>> This is how I currently deal with errors:
>>> - I use the ExceptionReporter to override the default Tapestry 
>>> exception page
>>> - I implement a small Tapestry service wired to the 
>>> ApplicationStateManager deal with errors, which also allows me to do 
>>> some additional error reporting of user info
>>>
>>> * Should I be using a RequestFilter/Dispatcher for exceptions?
>>> * Should I use the onException Tapestry event method in my 
>>> layout/border component?
>>>
>>> I would also like to override server error pages (404, 500 etc...) 
>>> for uncaught server exceptions but at the moment I cant get this to 
>>> work right with Tapestry, I would love to hear your ideas.
>>>
>>> Thanks
>>> Peter
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 Error handling

Posted by Peter Stavrinides <p....@albourne.com>.
Hi Filip,

That's clever!, definitely worth looking into, I could modify my service 
quite easily, thanks for your comment !

Filip S. Adamsen wrote:
> Hi Peter,
>
> I've turned the RequestExceptionHandler service into a pipeline, which 
> seems to work quite well for my applications. I inject the 
> DefaultRequestExceptionHandler and use it as the terminator in the 
> pipeline, that way the old behaviour is preserved if no filters are 
> added to the pipeline.
>
> It works very well for me.
>
> -Filip
>
> Peter Stavrinides skrev:
>> Hi All,
>>
>> I would like your opinions on best practices for error handling.
>>
>> This is how I currently deal with errors:
>> - I use the ExceptionReporter to override the default Tapestry 
>> exception page
>> - I implement a small Tapestry service wired to the 
>> ApplicationStateManager deal with errors, which also allows me to do 
>> some additional error reporting of user info
>>
>> * Should I be using a RequestFilter/Dispatcher for exceptions?
>> * Should I use the onException Tapestry event method in my 
>> layout/border component?
>>
>> I would also like to override server error pages (404, 500 etc...) 
>> for uncaught server exceptions but at the moment I cant get this to 
>> work right with Tapestry, I would love to hear your ideas.
>>
>> Thanks
>> Peter
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 Error handling

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi Peter,

I've turned the RequestExceptionHandler service into a pipeline, which 
seems to work quite well for my applications. I inject the 
DefaultRequestExceptionHandler and use it as the terminator in the 
pipeline, that way the old behaviour is preserved if no filters are 
added to the pipeline.

It works very well for me.

-Filip

Peter Stavrinides skrev:
> Hi All,
> 
> I would like your opinions on best practices for error handling.
> 
> This is how I currently deal with errors:
> - I use the ExceptionReporter to override the default Tapestry exception 
> page
> - I implement a small Tapestry service wired to the 
> ApplicationStateManager deal with errors, which also allows me to do 
> some additional error reporting of user info
> 
> * Should I be using a RequestFilter/Dispatcher for exceptions?
> * Should I use the onException Tapestry event method in my layout/border 
> component?
> 
> I would also like to override server error pages (404, 500 etc...) for 
> uncaught server exceptions but at the moment I cant get this to work 
> right with Tapestry, I would love to hear your ideas.
> 
> Thanks
> Peter
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org