Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: