Thanks for the pointer - I thought that may be the case but couldn't pin point it in the docs.
Cool, and thanks for the onActivate() tip too! Steve. On 13 September 2011 01:48, derkoe <tapestry.christian.koeb...@gmail.com> wrote: > > Steve Eynon wrote: >> >> ...it doesn't say "Hello!!!"? Is onException() not called during >> RenderPhase events? And if not, why not!? (It would seem a little >> inconsistent.) >> >> I wish to throw a couple of bespoke exceptions during onActivate() and >> setupRender() and have then caught and handled by a Mixin that I apply >> to every page. How else may I accomplish this? The exceptions relate >> to IllegalContexts / StaleSessions and the like, so they are real >> problems encountered during the render phase. >> > > As the documentation states > (http://tapestry.apache.org/component-events.html#ComponentEvents-EventMethodExceptions) > exceptions are only allowed in even methods. I think it's no good idea to > throw Exceptions in render phase. > If you want to handle that anyway you could decorate/replace > RequestExceptionHandler service. > > This works (because activate is an evet handler): > public class Whoops > { > void onActivate() > { > throw new RuntimeException("Whoops!"); > } > > Object onException(Throwable t) > { > System.err.println("Hello!!!"); > return true; > } > } > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/T5-x-onException-During-Render-Phase-tp4793110p4795093.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org