Changes to web flow action proposal
Marvin S. Addison
marvin.addison at gmail.com
Thu Apr 18 10:10:29 EDT 2013
> In Action.do[Pre|Post]Execute(), I wonder how throwing Exceptions
> which are caught by the AbstractProfileAction for logging and Event
> building would look
I wanted to draw attention to a detail on the topic of exception
handling, but hopefully it's a detail worth discussion:
if (doPreExecute(profileRequestContext)) {
try {
doExecute(profileRequestContext);
} finally {
doPostExecute(profileRequestContext);
}
}
That puts an awful lot of discipline on implementers of doPostExecute to
catch all exceptions. Without strict adherence, an exception raised by
doExecute would be dropped and replaced with that emanating from
doPostExecute. I have used a library with plugins using the pattern
above and have cursed the lack of additional error handling in the
finally block. I hope you'll consider a try/catch block that wraps
doPostExecute if you go with this design.
M
More information about the dev
mailing list