From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 696BCBC69 for ; Tue, 14 Aug 2007 10:01:55 +0200 (CEST) Received: from postar.fmf.uni-lj.si (vega.fmf.uni-lj.si [193.2.67.45]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7E81sqH005935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Aug 2007 10:01:55 +0200 Received: from localhost (unknown [192.168.5.1]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id 69898165E42; Tue, 14 Aug 2007 10:01:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at spam.fmf.uni-lj.si Received: from postar.fmf.uni-lj.si ([192.168.5.5]) by localhost (spam.fmf.uni-lj.si [192.168.5.1]) (amavisd-new, port 10024) with ESMTP id i6xQALTnNrLQ; Tue, 14 Aug 2007 10:01:52 +0200 (CEST) Received: from [193.2.67.88] (unknown [193.2.67.88]) by postar.fmf.uni-lj.si (Postfix) with ESMTP id DAD96165E3E; Tue, 14 Aug 2007 10:01:51 +0200 (CEST) Message-ID: <46C161A6.9010601@fmf.uni-lj.si> Date: Tue, 14 Aug 2007 10:02:46 +0200 From: Andrej Bauer Reply-To: Andrej.Bauer@andrej.com User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Kiran Pamnany , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Matching problem? References: <1187024336.46c08dd0c1ea7@webmail.cs.brown.edu> In-Reply-To: <1187024336.46c08dd0c1ea7@webmail.cs.brown.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 46C16172.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrej:01 andrej:01 prerr:01 endline:01 printexc:01 wrote:01 unix:01 unix:01 exception:01 exception:01 caml-list:01 output:02 supported:02 string:02 handler:03 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