From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id AD1147F02D for ; Sun, 19 Oct 2014 20:55:51 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=pra; client-ip=188.64.184.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=mailfrom; client-ip=188.64.184.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@bluechip4.ukhost4u.com) identity=helo; client-ip=188.64.184.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="postmaster@bluechip4.ukhost4u.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlIBAFkIRFS8QLgoemdsb2JhbABbg2HMa4dSAoEOFgERAQELBw0JQoQDAQEEOEABEAsHEQkWDwkDAgECAUUGDohIAb9kAQEBAQEFAQEBAQEdkFEHhEsFpUGQboFEgzYBAQE X-IPAS-Result: AlIBAFkIRFS8QLgoemdsb2JhbABbg2HMa4dSAoEOFgERAQELBw0JQoQDAQEEOEABEAsHEQkWDwkDAgECAUUGDohIAb9kAQEBAQEFAQEBAQEdkFEHhEsFpUGQboFEgzYBAQE X-IronPort-AV: E=Sophos;i="5.04,749,1406584800"; d="scan'208";a="83841477" Received: from bluechip4.ukhost4u.com ([188.64.184.40]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Oct 2014 20:55:50 +0200 Received: from [86.26.5.13] (port=50484 helo=[192.168.0.3]) by bluechip4.ukhost4u.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.82) (envelope-from ) id 1Xfvdu-003l5u-R0; Sun, 19 Oct 2014 19:55:50 +0100 Message-ID: <54440936.3010001@coherentgraphics.co.uk> Date: Sun, 19 Oct 2014 19:55:50 +0100 From: John Whitington User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: Gabriel Scherer CC: "caml-list@inria.fr" References: <5443FCE6.50206@coherentgraphics.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluechip4.ukhost4u.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Get-Message-Sender-Via: bluechip4.ukhost4u.com: authenticated_id: john@coherentgraphics.co.uk Subject: Re: [Caml-list] ANN: exn-source - exception backtraces with source code printing Hi Gabriel, Gabriel Scherer wrote: > > (we can't use exceptions at all inside a backtrace handler, for example) > > I'm a bit surprised by this. Part of the point of reifying traces into > datatypes (raw_backtrace, backtrace_slot) was to make them persistent. > set_uncaught_exception_handler is passed a raw trace that should not be > mutated by raising new exceptions. What breaks if you use exceptions > inside a backtrace handler? To quote the documentation for set_uncaught_exception_handler: "If fn raises an exception, it is ignored." This is a bit ambiguous -- it might mean a) The uncaught exception handler you register won't get called from inside itself in the case of an uncaught exception. Nor will any such exceptions be handled by the standard exception handler; or b) Exceptions in the handler literally have no effect. I've done a little test just now, and it seems to be (a), so perhaps it's just in need of clarification in the documentation. (It might be nice to have, for development, an option to have the default exception handler remain active, so it reports any exceptions escaping from the user-installed exception handler). Thanks, -- John Whitington Director, Coherent Graphics Ltd http://www.coherentpdf.com/