On Thu, 19 Jul 2012 09:53:39 -0300, captain_rhino
<graeme.kitc...@axa-travel-insurance.com> wrote:
I have several pages that several methods within them
public class Page
public void onActivate(EventContext ec){
//Code
}
public void onSuccess(){
//code
}
void onSelectedFromAButton(){
//code
}
In tapestry if any of the code goes wrong within my methods, in Tapestry
what is the best way to intercept any thing that goes wrong and then
redirect the user to for example an error page.
I do not want to put a try catch in each method and then redirect to my
error page.
AnyReturnTypeYouWant onException(Throwable throwable) {
...
}
Check http://tapestry.apache.org/component-events.html, section
Intercepting Event Exception.
What Lance suggested is the way to go for application-wide exceptions,
while the method above is good for exception handling that is specific to
one given page.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org