I am guilty of overusing Exception and casting up to Exception in the throws
clause when I know the more specific Exception, but I know that somewhere up
the chain it is going to get cast anyway, so my laziness.
Other times I have felt we should be throwing more specific Exceptions. One
such place might be an InvalidPermissionException, which Turbine could then
watch for instead of having every screen and action dealing with it on its
own. This is something I was planning to do in FreeTrade; I'm not sure if
Frank has already added this.
Now to the point of a TurbineException. Having an exception to use instead
of Exception would be useful in many places where we don't want to name a
more specific Exception and we now throw the general Exception
.
But:
I suppose a place where this might be used would be in the throws clause of
the actions/screens/navigations build method to replace the Exception there.
While this might be better practice, I think it would mean we would have to
catch exceptions in all these places and wrap them in a TurbineException.
This would require rewriting a lot of code, so while I won't -1, I certainly
would not look forward to it.
John McNally
----- Original Message -----
From: jon * <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Monday, March 13, 2000 10:49 PM
Subject: Re: Throwing "Exception" from within Turbine insteadof
"TurbineException"
> I want to hear what Frank and John think of this before I will comment.
>
> -jon
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]