jon * wrote:
>
> > catch ( ClassNotFoundException e )
> > {
> > + e.printStackTrace();
> > throw new Exception ( "Requested Screen not found: " + name );
> > }
> > return screen;
>
> Kevin,
>
> I'm -1 on this change because it is something that should be caught higher
> up. You should catch that exception somewhere else...because it has a "nice"
> error message in it. If you want to print a stack trace from that exception
> later on, then that is fine
No... it really isn't. Yes. It is true you get a stack trace but the
trace only goes up to the point where your did "throw new Exception".
The previous stack trace is wiped out. This is why I took both roads
with this:
1. The user gets a "Reguested Screen not found"
2. The Engineer/Admin get's the full stack trace and can figure out
where the problem is really occuring.
We can make it better handled where I print the stack trace to a
PrintWriter and then call log() on the string. This would add the
exception to the Servlet Engine error log.
> (it is usually done from within the Turbine
> servlet directly, but i can see you wanting to do it elsewhere), but I don't
> think it should happen there.
Does the above address this?
> Please back that change out. I also really do not want to clutter the code
> up with a bunch of printStackTraces()...that was one of the motivations
> behind Turbine in the first place.
Let me know if the above doesn't change your mind and I will take it
out.
> Preventing that and catching errors in
> one single location to prevent this.
Yes. I do like the Exception that is thrown (except I would have thrown
a TurbineException) and I agree it is the right way to do it however I
also want the stack trace.
Kevin
--
Kevin A Burton
Senior Software Engineer
Kendara Inc
http://www.kendara.com
Mobile: 408-910-6145
Linux - The revolution will NOT be televised
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]