caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Denis Bueno" <dbueno@gmail.com>
To: "OCaml Mailing List" <caml-list@inria.fr>
Subject: Getting exception backtraces without exiting ocaml
Date: Sat, 31 Mar 2007 11:46:59 -0400	[thread overview]
Message-ID: <6dbd4d000703310846p64d52e1l5acfe1de40077f00@mail.gmail.com> (raw)

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


             reply	other threads:[~2007-03-31 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-31 15:46 Denis Bueno [this message]
2007-03-31 18:31 ` [Caml-list] " David Baelde
2007-03-31 20:39 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6dbd4d000703310846p64d52e1l5acfe1de40077f00@mail.gmail.com \
    --to=dbueno@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).