From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DDCFFBC69 for ; Sat, 31 Mar 2007 17:47:01 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2VFl0hD003513 for ; Sat, 31 Mar 2007 17:47:01 +0200 Received: by wr-out-0506.google.com with SMTP id q50so893834wrq for ; Sat, 31 Mar 2007 08:47:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=VlOcspFAmQHuYJZ3nmur6a1O9ElTEqnsfxTbjEfqV8NDm4GJHH41W0AVa4Is6aH0jgfFO1IQAwMFIW1noV/HF7fvh5eRDBfkPkEp83oHOTwGpwbe0qrJD5/P3eyLAIUlLIg1vXeyOIylYhNDRfbHxapo/vuSYOaFA2W8JKqEQ3Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=r887Lgcc1rXqKZUTHX04DgiLkzlxYS9IN7SQ292CmaCgn7K3Gy7XWlkjJZTt9EC2rnSRMzsa7Y22N7qSHQ++LAypALAyIJZZd0Lm+JAPggZcQ5hjw1dNCHpfn63Atk90nhUAXcIGlhriDwV5jQ7OwpCWMAGGBSK3ZfA6fBLI6dw= Received: by 10.114.127.1 with SMTP id z1mr1211803wac.1175356019313; Sat, 31 Mar 2007 08:46:59 -0700 (PDT) Received: by 10.114.195.2 with HTTP; Sat, 31 Mar 2007 08:46:59 -0700 (PDT) Message-ID: <6dbd4d000703310846p64d52e1l5acfe1de40077f00@mail.gmail.com> Date: Sat, 31 Mar 2007 11:46:59 -0400 From: "Denis Bueno" To: "OCaml Mailing List" Subject: Getting exception backtraces without exiting ocaml MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 460E8274.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460E8274.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 backtrace:01 ocaml:01 runtime:01 compiler:01 compiler:01 printexc:01 backtrace:01 compile:01 exception:01 exception:01 exceptions:01 string:02 unexpected:03 unit:03 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