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 OAA12984; Wed, 6 Aug 2003 14:21:08 +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 OAA19708 for ; Wed, 6 Aug 2003 14:21:07 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h76CL5T05174 for ; Wed, 6 Aug 2003 14:21:06 +0200 (MET DST) Received: (qmail 20768 invoked by uid 566); 6 Aug 2003 12:21:04 -0000 Date: Wed, 6 Aug 2003 14:19:41 +0200 From: Michal Moskal To: caml-list@inria.fr Subject: Re: [Caml-list] assert caught by try with _ Message-ID: <20030806121941.GC2333@roke.freak> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.3.2.7.2.20030729113455.02401e98@localhost> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 hecker:01 debugger:01 popping:01 bug:01 hard-coded:01 prerr:01 endline:01 chris:01 kernel:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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" -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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