From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id BFA9FBBFB for ; Tue, 21 Jun 2005 10:34:08 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5L8Y8MS002416 for ; Tue, 21 Jun 2005 10:34:08 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA27457 for ; Tue, 21 Jun 2005 10:34:07 +0200 (MET DST) Received: from smtp001.mail.ukl.yahoo.com (smtp001.mail.ukl.yahoo.com [217.12.11.32]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id j5L8Y79f002413 for ; Tue, 21 Jun 2005 10:34:07 +0200 Received: (qmail 96489 invoked from network); 21 Jun 2005 08:34:07 -0000 Received: from unknown (HELO ?10.0.0.115?) (pasckosky@213.255.109.130 with plain) by smtp001.mail.ukl.yahoo.com with SMTP; 21 Jun 2005 08:34:06 -0000 Message-ID: <42B7D0FD.5090305@barettadeit.com> Date: Tue, 21 Jun 2005 10:34:05 +0200 From: Luca Pascali User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: exception Failure and failwith Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42B7D100.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42B7D0FF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; failwith:01 failwith:01 pervasives:01 ocaml:01 checker:01 defines:01 baretta:01 baretta:01 ...:98 .....:98 gratis:98 exception:01 exception:01 constructor:01 define:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Hi everyone. I've ran into a situation and I need a little explanation. It's all about the failwith function of pervasives (that simply raises an exception Failure of string). Normally, that exception can be cought by means of a try...with using as clause something like | Failure s -> ..... That's good. But what if I define something (another exception like module Stream does), a constructor (like I did) with the name Failure? Obviously the Ocaml type checker will make all controls with the new definition of Failure (starting from that point). But what if I want to catch the Failure exception? :-/ It seems that no module defines it, so I did not find any way to identify the exception. Thanks to everyone Luca -- ********************************************************************* Luca Pascali luca@barettadeit.com asxcaml-guru@barettadeit.com http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. 02 370 111 55 fax. 02 370 111 54 Our technology: http://www.asxcaml.org/ http://www.freerp.org/ ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it