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=2.0 required=5.0 tests=AWL,RCVD_NUMERIC_HELO, SPF_FAIL 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 30C1EBC0A for ; Thu, 19 Apr 2007 21:48:22 +0200 (CEST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3JJmLYE018756 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 19 Apr 2007 21:48:22 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Hecbx-0007S0-Me for caml-list@inria.fr; Thu, 19 Apr 2007 21:48:09 +0200 Received: from 38.96.172.125 ([38.96.172.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2007 21:48:09 +0200 Received: from sds by 38.96.172.125 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2007 21:48:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sam Steingold Subject: stack trace on exception in top-level Date: Thu, 19 Apr 2007 15:47:55 -0400 Message-ID: <4627C76B.7000109@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 38.96.172.125 User-Agent: Thunderbird 1.5.0.8 (X11/20061107) Sender: news X-Miltered: at discorde with ID 4627C785.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; stack:01 sprintf:01 val:01 val:01 exception:01 exception:01 exceptions:01 int:01 int:01 argument:02 argument:02 top-level:02 top-level:02 arg:03 gnu:03 how do I get backtraces on exceptions in then top-level? E.g.: # let f x = invalid_arg (sprintf "error: %d" x) ;; val f : int -> 'a = # let g x = f (x+1) ;; val g : int -> 'a = # let h x = g (x+1) ;; val h : int -> 'a = # h 1;; Exception: Invalid_argument "error: 3". I want to see something like: h called g on line 1 g called f on line 1 f raised invalid_argument on line 1 thanks. Sam,