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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id EB980BC69 for ; Wed, 24 Oct 2007 09:09:43 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAOKMHkfUGyodimdsb2JhbACOWQEBAQgEBhERBw X-IronPort-AV: E=Sophos;i="4.21,323,1188770400"; d="scan'208";a="3541250" Received: from smtp3-g19.free.fr ([212.27.42.29]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2007 09:09:43 +0200 Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 7F0D117B56D; Wed, 24 Oct 2007 09:09:43 +0200 (CEST) Received: from [192.168.0.4] (rke75-3-82-229-183-156.fbx.proxad.net [82.229.183.156]) by smtp3-g19.free.fr (Postfix) with ESMTP id 5CB9D17B55D; Wed, 24 Oct 2007 09:09:43 +0200 (CEST) Message-ID: <471EEF12.60203@frisch.fr> Date: Wed, 24 Oct 2007 09:06:58 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Micha=EBl_Le_Barbier?= Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Preferred use of Invalid_argument and Failure References: <867ildqacq.fsf@Llea.celt.neu> In-Reply-To: <867ildqacq.fsf@Llea.celt.neu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; frisch:01 frisch:01 advices:01 wrote:01 caml-list:01 exceptions:01 exceptions:01 constraint:01 alain:01 alain:01 interfaces:01 interfaces:01 define:02 modules:02 argument:02 Michaël Le Barbier wrote: > I am working on a library, I want the interfaces to look like standard > library modules interfaces. ... > Again, I would be glad to get advices of discipline in using > theses two exceptions. What works for you? My advice would be not to use these two exceptions and to define custom exceptions in your library. You'll be able to pattern match on them more easily and to store extra relevant information. Of course, this breaks your design constraint of looking like the standard library. -- Alain