Strange Exception at read
fyaoxy at gmail.com
Thu Nov 12 04:05:12 PST 2009
2009/11/12 Alan Bateman <Alan.Bateman at sun.com>:
> 向雅 wrote:
>> Hi Alan,
>> After tired the aio Socket channel and File channel, I found those use
>> different Exception process way seperately.
>> For some os error , File channel use some Exception classes, but
>> Socket channel use IOException with os error message. The later hard
>> to determinate to advance processing.
>> There have some plan to unify those exceptions with os error?
> I'm aware of a couple of cases (AsynchronousSocketChannel.connect on Windows
> for example) where we don't translate the OS error with the result that we
> throw an IOException rather than the more specific ConnectException that
> SocketChannel and legacy Socket might throw. Is that what you are thinking
for example the IOException in this message, I got a "IOException:
I debug to Iocp get the os errno: 5, windows system error number.
I tested aio File channel, I get the errno 5 again, but it wrapped
So I browsed the new file channel implementation, besides
there have more specific exception.
More information about the nio-dev