Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Printexc cannot print some (but not all) exceptions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Printexc cannot print some (but not all) exceptions
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.


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -