Re: [Actionframework-users] also velocity requestCleanup
Status: Inactive
Brought to you by:
ptoman
From: Mark D. A. <md...@di...> - 2002-09-30 23:43:55
|
> Let's discuss where could an error ocurr and how to handle it: > - error in action method -> handled by <on-exception> or onException() > - in template -> exception is propagated from handle() No it isn't, if my reading of the code is correct. handle() only returns a template, it is not above the stack when the template is actually executed. If you look at doRequest() in org/apache/velocity/servlet/VelocityServlet.java, you'll see that handleRequest() is what calls into the actionservlet stuff. After that returns, *then* it calls mergeTemplate, and any exceptions there are missed by actionservlet. If actionservlet had an override for error() in org/apache/velocity/servlet/VelocityServlet.java, things would be better, but right now a lot is missed. Furthermore (again, according to my reading of the code), currently actionservlet makes it impossible to have exception handling (or cleanup handling) with the same scope that is possible when using velocity directly. -mda |