robert burrell donkin wrote:
On 7/4/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
robert burrell donkin ha scritto:
> handleConnection catches RuntimeException but not all throwable
> exceptions. whenever an error is thrown this results in a silent
> failure. what's the reasoning behind this?
>
> - robert
It also catches all of the checked exceptions declared by the called
code, right? (SocketException, InterruptedIOException, IOException).
What kind of "Error" do you think should be catched (and could be
succesfully handled) here?
successful handling is a different question. we've argued before about
specification compliance verses java best practice error handling.
i prefer servers to comply with the specification whenever possible.
so, in the case of IMAP IMHO JAMES should try to send an untagged BYE
with a message even when faced with an error.
E.g: I don't think that catching an OOM in the connection handling is a
good idea.
in the event of an OOM exception being thrown, i would expect an
application to log this fact so that an administrator can do something
about it. silently dropping connections (which is what happens ATM) is
IMHO not the right behaviour.
IMHO JAMES should comply with the specification and try to send an
untagged BYE with an error message before closing the connection. yes,
this may fail but IMHO at least an attempt should be made.
+1
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]