Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: David Mentre <David.Mentre@i...>
Subject: Re: [Caml-list] A few questions regarding the compiler
"Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl> 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:
http://caml.inria.fr/archives/200007/msg00028.html (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:
http://caml.inria.fr/archives/200109/msg00111.html

Best regards,
d.
-- 
 David.Mentre@inria.fr
 Opinions expressed here are only mine.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr