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
> about?
>
> -Alan.
>
Yes,
for example the IOException in this message, I got a "IOException:
Access Denied".
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
with AccessDeniedException.
So I browsed the new file channel implementation, besides
AccessDeniedException,
there have more specific exception.
Regards,
qinxian
More information about the nio-dev
mailing list