Hmmmm. I recant my heresy!
Tomcat is not to blame here. I have just reminded myself that IOException
is the only checked exception thrown by OutputStream and
IllegalStateException is unchecked. Given that the rule-of-thumb is 'use
unchecked exceptions only if the error cannot occur in a bug-free, correctly
running, well configured system', and that a closed socket can happen any
system, the JDK classes should be throwing IOException.
david
----- Original Message -----
From: "David Hamilton" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 8:06 PM
Subject: Re: RE : java.lan.OutOfMemoryError
> That was my evaluation. The error handling looked distinctly fragile to
me.
> To be honest, it looks like Sun have tightened up their state-checking
with
> the nio package (good) and exposed some weaknesses in the tomcat code
(bad).
>
> But then I have strong opinions on error handling (i.e. you should define
a
> policy for it in your coding standard). It seems too often that it's just
> left to individual coders to make arbitrary decisions on which errors
ignore
> and which to escalate... seems to be a frequent cause of 'unexpected'
> behaviour!
>
> david
>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>