Thanks Thiago. I am a bit confused from the API, it said: * @throws org.apache.tapestry5.runtime.ComponentEventException * if an event handler method throws a checked or unchecked exception
but seems it did not go this way. On Mon, Aug 20, 2012 at 1:07 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 20 Aug 2012 12:09:25 -0300, Yunhua Sang <yunhua.s...@gmail.com> > wrote: > > Hi there, >> > > Hi! > > > Tapestry version: 5.3.3 >> >> How to catch the exceptions thrown by the event handler? >> >> e.g.: >> try { >> resources.triggerEvent("**anEvent", new Object[]{}, >> null); >> } catch (Exception e) { >> logger.error("Error occurred.", e); >> form.recordError(e.getMessage(**)); >> } >> > > triggerEvent() just triggers the event, it doesn't handle it. > > > But seems that the catch parts never get executed, T5 just redirects the >> request to the exception page. >> > > You can use a global exception page. > > > -- > Thiago H. de Paula Figueiredo > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > >