Rafal Krzewski wrote:
>
> Hi,
> (this message is addressed primarily to John
> McNally, as the person with most experience
> in this field)
>
> Today I was reworking the exception handling in the
> service implmentations we have, and I encoutered
> one thing that I'm not sure of.
>
> Our templating services (WM, Velocity, FreeMarker and JSP)
> have metod called handleRequest(...) is declared to
> throw Exception.
>
> None of them is actually throwing any exceptions.
FreeMarker and JSP are not declared as throwing exceptions. I think
maybe they should, though I cannot remember why they are not. I think
the FreeMarkerService just somewhat followed the example of FreeMarker
itself which I think adds its error messages to the output (as
comments?). While the JspService is still in an alpha stage and
hopefully this is helping to debug things. :)
I think the best thing to do in all these services may be to wrap them
in the TurbineException and throw them. Possibly the decision to Log
and definitely the decision to output the error belongs at a different
level. I am thinking the true Exception was being covered up upstream,
which is why it may be being logged within the service.
I would vote for having exceptions thrown up to the Turbine Servlet
where they could be handled uniformly. But that may not be practical,
since you generally want to log at a certain priority. Maybe the
logging should be done locally, but the exceptions should always be
passed on to Turbine.java for final handling.
What is your (and others) inclination?
> Feedback is mostly appreciated.
>
> Rafal
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]