Version française
Home     About     Download     Resources     Contact us    
Browse thread
Getting exception backtraces without exiting ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Denis Bueno <dbueno@g...>
Subject: Getting exception backtraces without exiting ocaml
All-

Is there a way to get an exception backtrace *without* having to exit
the ocaml runtime?

Some background:

I use the OUnit unit testing framework
(http://www.xs4all.nl/~mmzeeman/ocaml/) to unit test my compiler. I
like the fact that I can see *all* the test failures every time I run
the tests. That is, if one file fails to compile for some reason, I
can still see failures of other tests for independent parts of the
compiler.

This feature is only possible because OUnit catches exceptions that I
don't catch, runs Printexc.to_string on them, and continues with the
rest of the tests. However, this interferes with ocamlrun's printing
of the exception backtrace, which I really want in case of an
unexpected exception.

Can I get what I want?

-Denis