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 (17:05)
From: Artem Prisyznuk <tema@s...>
Subject: Re: [Caml-list] exceptions
On Thu, 20 Nov 2003 17:20:54 +0100, Christian Schaller 
<Christian.Schaller@siemens.com> wrote:

> 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.

Compile and link your program with -g. After that say


Run your program. If uncaught exception raised backtrace log will be print 
on your stderr:

Fatal error: exception Not_found
Raised at file "test.ml", line 1, character 15

PS: this work only for bytecode compiler.

Artem Prysyznuk

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