From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA22228; Wed, 6 Aug 2003 16:50:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA01210 for ; Wed, 6 Aug 2003 16:50:25 +0200 (MET DST) Received: from nexus.stwing.upenn.edu (NEXUS.STWING.UPENN.EDU [165.123.132.61]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h76EoOT10139 for ; Wed, 6 Aug 2003 16:50:24 +0200 (MET DST) Received: from force.stwing.upenn.edu (root@force.stwing.upenn.edu [165.123.132.65]) by nexus.stwing.upenn.edu (8.12.9/8.12.9) with ESMTP id h76EoMgZ005411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Aug 2003 10:50:23 -0400 (EDT) Received: from force.stwing.upenn.edu (wlovas@[127.0.0.1]) by force.stwing.upenn.edu (8.12.9/8.12.9) with ESMTP id h76EoL4Q018471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Aug 2003 10:50:22 -0400 (EDT) Received: (from wlovas@localhost) by force.stwing.upenn.edu (8.12.9/8.12.9/Submit) id h76EoLkE018470 for caml-list@inria.fr; Wed, 6 Aug 2003 10:50:21 -0400 (EDT) Date: Wed, 6 Aug 2003 10:50:21 -0400 From: William Lovas To: caml-list@inria.fr Subject: Re: [Caml-list] assert caught by try with _ Message-ID: <20030806145020.GA18143@force.stwing.upenn.edu> Mail-Followup-To: caml-list@inria.fr References: <4.3.2.7.2.20030728192639.025496d8@localhost> <4.3.2.7.2.20030728112622.02f3fef8@localhost> <00d301c3553b$9c01f030$ca00a8c0@warp> <4.3.2.7.2.20030728192639.025496d8@localhost> <4.3.2.7.2.20030729113455.02401e98@localhost> <20030806121941.GC2333@roke.freak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030806121941.GC2333@roke.freak> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lovas:01 wlovas:01 stwing:01 caml-list:01 michal:01 moskal:01 hecker:01 debugger:01 popping:01 bug:01 hard-coded:01 prerr:01 endline:01 chris:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 06, 2003 at 02:19:41PM +0200, Michal Moskal wrote: > On Tue, Jul 29, 2003 at 02:01:07PM -0700, Chris Hecker wrote: > > Another way of thinking about this is that almost everybody re-#defines > > assert in production C/C++ programs to do their own assert handling during > > development (whether it's printing out additional information, allowing you > > to drop into the debugger, popping up a message box, sending bug email, > > whatever). With assert hard-coded into ocaml, you can't do this. > > try > main () > with Assert_failure (line, col, file) -> (* or whatever it is *) > prerr_endline "Panic! Contact support" This won't trigger, though, if the exception has already been caught upstream. William ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners