[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alessandro Baretta <a.baretta@b...> |
| Subject: | Re: [Caml-list] Seeking exception source |
Nicolas Cannasse wrote: >> I am occasionally annoyed by Not_found propagating to my >> top level function .. meaning the error could be anywhere >> at all in my program. > > > At that time the best is to run your program in bytecode with debug > infos using ocamlrun -b so you'll get full backtrace informations. It > would be better for such debug informations (not all the types but only > the bytecode -> source positions) to be included by default, and always > have backtrace turned on. In many cases this is completely inadequate. The AS/Xcaml application server, for example, cannot terminate on an uncaught exception in a program module. The main loop must catch the exception and do its best to report it, without aborting the execution of the server. This means that I need to get the backtrace within Ocaml code by applying some kind of function to the exception object. I tried to write a C function providing this kind of information, but I never managed to get it to work. Alex