Version française
Home     About     Download     Resources     Contact us    
Browse thread
Matching problem?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andrej Bauer <Andrej.Bauer@f...>
Subject: Re: [Caml-list] Matching problem?
Kiran Pamnany wrote:
> ...
> begin try
>   syscall (fun () -> Unix.connect s ...
>   ...
> with
>   Unix.Unix_error(UNIX.EINPROGRESS,_,_) -> ...
>   | Unix.Unix_error(e,_,_) -> ...
>   | err -> prerr_endline (Printexc.to_string err)
> done;
> ...
> 
> The output for this is:
> 
> Unix.Unix_error(38, "connect", "")
> 
> How is this possible?

I am just guessing, but the exception handler for the second case calls 
Unix.close on line 963, which could raise a further exception that would 
not get caught. Also some of the Unix.xxx calls before the begin..try 
block could raise an exception. The odd thing is you're getting 
Unix_error(_, "connect", _), i.e., as if the actual call to Unix.connect 
causes it. By the way, isn't error 38 "function not supported"? What 
does that tell us?

Andrej