English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
Backtracting exceptions in toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-03-29 (22:46)
From: Jake Donham <jake@d...>
Subject: Re: [Caml-list] Backtracting exceptions in toplevel
On Mon, Mar 29, 2010 at 12:15 PM, C. Fr <newsgroups.fr@gmail.com> wrote:
> It there a way to get a backtrace for exceptions occurring in the toplevel
> (for example, getting more information when the stack blows)? I’ve read that
> there was an equivalent of the -b option that ocamlrun uses, but I couldn’t
> find any subsequent information on it.

In 3.11.x there is Printexc.record_backtrace which controls the -b
flag, and Printexc.get_backtrace to get the trace of the last

If you want to see backtraces printed automatically in the toplevel,
try my patch: