You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Julien Vermillard <jv...@archean.fr> on 2005/12/19 17:44:22 UTC

[MINA] ConnectFuture

Hi
Why does ConnectFuture.join(); don't throw the IOException when a
connection fail ?

I see it's  ConnectFuture.getsession(); who throw the stocked Exception
back to the caller but in some of my code i don't want to get the
IoSession, but I whould like to get the IOException.

Julien


Re: [MINA] ConnectFuture

Posted by Julien Vermillard <jv...@archean.fr>.
Le mercredi 21 décembre 2005 à 18:43 +0900, Trustin Lee a écrit :
> Hi Julien,
> 
> 2005/12/20, Julien Vermillard <jv...@archean.fr>:
>         Hi
>         Why does ConnectFuture.join(); don't throw the IOException
>         when a
>         connection fail ?
>         
>         I see it's  ConnectFuture.getsession(); who throw the stocked
>         Exception
>         back to the caller but in some of my code i don't want to get
>         the 
>         IoSession, but I whould like to get the IOException.
> 
> That's an interesting question.  CloseFuture or WriteFuture doesn't
> throw any exception at all.  That's why join() doesn't throw any
> exception.  Why don't you just call getSession() and don't use the
> returned session?  Does it look bad? 
> 
A bit, but I agree I'm a bit picky ;)

It's not a big issue anyway

Julien


Re: [MINA] ConnectFuture

Posted by Trustin Lee <tr...@gmail.com>.
Hi Julien,

2005/12/20, Julien Vermillard <jv...@archean.fr>:
>
> Hi
> Why does ConnectFuture.join(); don't throw the IOException when a
> connection fail ?
>
> I see it's  ConnectFuture.getsession(); who throw the stocked Exception
> back to the caller but in some of my code i don't want to get the
> IoSession, but I whould like to get the IOException.


That's an interesting question.  CloseFuture or WriteFuture doesn't throw
any exception at all.  That's why join() doesn't throw any exception.  Why
don't you just call getSession() and don't use the returned session?  Does
it look bad?

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C