Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Finding how and where an exception is raised
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Finding how and where an exception is raised
> I would like to find how and where an exception is raised by printing a
> stack backtrace (something like Java Throwable.printStackTrace()).
> 
> It seems to be impossible in plain ocaml. I could set the environment
> variable OCAMLRUNPARAM="b=1" and let the exception escape the program,
> but I would only get one exception.

Right.  I think the "stack backtrace" mechanism of OCaml could be
extended to provide what you need.  I'll look into this after 3.02 is
out.

Best wishes,

- Xavier Leroy
-------------------
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