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
Pretty printing Toploop errors?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-10 (10:54)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Pretty printing Toploop errors?
On Sun, Jul 09, 2006 at 02:33:35PM -0400, Geoffrey Alan Washburn wrote:
> 	I'm trying to use Toploop within a program I'm working on and some 
> 	code I'm feeding it is causing a type error.  Unfortunately, the best I've 
> been able to figure out is to use Toploop.print_exception_outcome or 
> Pcaml.report_error which just tell me
> 	Uncaught exception: Typecore.Error (_, _)
> Are there any hooks for printing out a useful type error message?  Or am 
> I going to need to compile directly against the type-checking code from 
> the compiler?  Thanks!

Std.dump from Extlib will print whatever is inside the exception,
although it's not very pretty.


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