From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A63CDBC57 for ; Tue, 30 Mar 2010 00:46:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBAIfKsEvRVdQ0kGdsb2JhbACIPpJhCBUBAQEBCQkMBxEDH7FHhSSIegEBAwWEfASDHokY X-IronPort-AV: E=Sophos;i="4.51,330,1267398000"; d="scan'208";a="56138308" Received: from mail-vw0-f52.google.com ([209.85.212.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Mar 2010 00:46:16 +0200 Received: by vws3 with SMTP id 3so5246629vws.39 for ; Mon, 29 Mar 2010 15:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:received:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=w/DBUnZBDSwPBnQjJFlZVMrfejQ9NFe5OgSp/A9Nx+s=; b=WUESy3i5cQIqYMPS/g+FwRbTYciJOQT04jn/NLdTlrxE92KzsmbSTs9TpcGCgo/EAB /IZjyUunZEF7ehTTeqwPXm9v3prF+mwSSTSAcp4AVfsORfo7+5WL8Hzl9BBBopTXRKnq DXqYLaUEqg6/cW87eBDKWVDLlIGSPVSeWd0MI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=t2fYV620cBabbV1T6Ca3VFV+DMpA1MOzcAkC3XQgw1jkSE4sh3dCKFNjllB/ag86MZ eOLk7N1ZM4tRMDsiKI8t2i/uDYLM9WQHeHapjbCE4/2BVjgk1/BvnQnye3kwLrtpUwV4 VkTXnxuuv2P55RDdSOG+v4ZwVnSA2ibDRP0so= MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.220.97.5 with HTTP; Mon, 29 Mar 2010 15:45:55 -0700 (PDT) In-Reply-To: <4bb0fc46.11b38c0a.3fb3.7cee@mx.google.com> References: <4bb0fc46.11b38c0a.3fb3.7cee@mx.google.com> From: Jake Donham Date: Mon, 29 Mar 2010 15:45:55 -0700 X-Google-Sender-Auth: ee513adf02bd17cc Received: by 10.220.125.93 with SMTP id x29mr3550834vcr.125.1269902776095; Mon, 29 Mar 2010 15:46:16 -0700 (PDT) Message-ID: Subject: Re: [Caml-list] Backtracting exceptions in toplevel To: "C. Fr" Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; toplevel:01 backtrace:01 toplevel:01 ocamlrun:01 printexc:01 backtrace:01 printexc:01 wrote:01 stack:01 exception:01 caml-list:01 exceptions:01 exceptions:01 uses:07 patch:08 On Mon, Mar 29, 2010 at 12:15 PM, C. Fr wrote: > It there a way to get a backtrace for exceptions occurring in the topleve= l > (for example, getting more information when the stack blows)? I=92ve read= that > there was an equivalent of the -b option that ocamlrun uses, but I couldn= =92t > find any subsequent information on it. In 3.11.x there is Printexc.record_backtrace which controls the -b flag, and Printexc.get_backtrace to get the trace of the last exception. If you want to see backtraces printed automatically in the toplevel, try my patch: http://ambassadortothecomputers.blogspot.com/2010/03/updated-backtrace-pa= tch.html Jake