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
[Caml-list] exceptions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-20 (16:38)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] exceptions
> Is there any way to get more details regarding exceptions?  Whenever my
> program raises an exception, it doesn't display the line that raised it.
> E.g. List.nth.  Say, I have several of these function calls.  How can I
> tell which one got the wrong list or index?

This should be in the FAQ somewhere:

- Compile and link to bytecode with debugging info enabled ("ocamlc -g").
- Set the environment variable OCAMLRUNPARAMS to the value "b"
  (as in "backtrace").
- Execute your program.  Voila, nice stack backtrace with line numbers.

Xavier Leroy

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners