From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id D8692BB81 for ; Fri, 13 Jan 2006 17:10:33 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0DGAWxN028573 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 13 Jan 2006 17:10:33 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1ExRuf-0007Ku-00; Fri, 13 Jan 2006 16:36:29 +0000 Date: Fri, 13 Jan 2006 16:36:29 +0000 To: Virgile Prevosto Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Printexc cannot print some (but not all) exceptions Message-ID: <20060113163627.GB14618@furbychan.cocan.org> References: <20060113152333.GA14618@furbychan.cocan.org> <20060113165436.1e64f458@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060113165436.1e64f458@localhost.localdomain> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 43C7D0F8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 printexc:01 printexc:01 notepad:01 wrote:01 exception:01 exception:01 pair:01 pair:01 exceptions:01 argument:01 int:01 tuple:02 std:02 guess:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Fri, Jan 13, 2006 at 04:54:36PM +0100, Virgile Prevosto wrote: > I'd guess that your Http_error is an exception taking one argument which > happens to be a pair, instead of two arguments (like MyException does). > Remember that, as with sum types, the two definitions: Right, well spotted! This is the definition: exception Http_error of (int * string);; (* The server sent an error message. The left component of the pair is * the error code, the right component is the error text. *) I'll resort to using Std.dump to find out what's in the exception, although it would be nice if Printexc could look inside the tuple and print its contents. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com