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
[Caml-list] A few questions regarding the compiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-11-14 (13:21)
From: David Mentre <David.Mentre@i...>
Subject: Re: [Caml-list] A few questions regarding the compiler
"Marcin 'Qrczak' Kowalczyk" <> writes:

> It would be ideal to be able to obtain the backtrace programmatically
> after I catch an exception.

Maybe I have missed something but the point of raising an exception and
getting its location has already been discussed on the list: (look also at the thread)

To generate a backtrace, just do an "assert(false)" with the environment
variable OCAMLRUNPARAM set to "b=1" (without quotes, see man ocamlrun).

> I could even think about translating positions to real source in this
> case. Is that possible?

Yes. Somebody has written a tool to convert a trace in source position:

Best regards,
 Opinions expressed here are only mine.
Bug reports:  FAQ:
To unsubscribe, mail  Archives: