From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA14883 for caml-red; Tue, 31 Oct 2000 10:47:36 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA22607 for ; Mon, 30 Oct 2000 16:09:28 +0100 (MET) Received: from opus.cs.cornell.edu (exchange.cs.cornell.edu [128.84.97.8]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id e9UF9Rr12616; Mon, 30 Oct 2000 16:09:27 +0100 (MET) Received: by opus.cs.cornell.edu with Internet Mail Service (5.5.2650.21) id ; Mon, 30 Oct 2000 10:09:26 -0500 Message-ID: <706871B20764CD449DB0E8E3D81C4D43BFCB5F@opus.cs.cornell.edu> From: Greg Morrisett To: "'stephanh@win.tue.nl'" , Pierre Weis , orodeh@cs.huji.ac.il Cc: caml-list@inria.fr Subject: RE: Where did the exception occur? Date: Mon, 30 Oct 2000 10:09:25 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: weis@pauillac.inria.fr > I'm not the OP, but this can of course be implemented by having an > additional (hidden) field in the exception which contains the source > co-ordinate. This is really cheap to add. But it's not very useful in practice. The problem is that you call a higher order function (e.g., find or something like that) and you really need to know who called that function to narrow down the context suffiently. What you really want is a stack backtrace hence my suggestion. And Pierre is (rightfully) worried about the overhead of supporting the full backtrace. Still, it's so useful that I would highly encourage its support. (We've done this with our Popcorn compiler recently in a rather naive way, and in spite of the overhead, I leave it on all the time because it's just so useful.) -Greg