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 VAA29758; Mon, 25 Feb 2002 21:01:20 +0100 (MET) 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 VAA29833 for ; Mon, 25 Feb 2002 21:01:19 +0100 (MET) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g1PK1Iv21421 for ; Mon, 25 Feb 2002 21:01:18 +0100 (MET) Received: from kallisti.apple.com(wetware.wetware.com[199.108.16.1]) (2320 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Mon, 25 Feb 2002 12:00:05 -0800 (PST) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Jan-4) Date: Mon, 25 Feb 2002 12:00:09 -0800 Subject: Re: [Caml-list] assert false and -noassert Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: "'The Trade'" To: "Mattias Waldau" From: james woodyatt In-Reply-To: <000001c1bd12$ceaab700$0700a8c0@gateway> Message-Id: <4522D3D1-2A2A-11D6-A21E-000502DB38F5@wetware.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sunday, February 24, 2002, at 01:08 AM, Mattias Waldau wrote: > > I totally support the current implementation, you NEVER want > a program to just terminate. At least you should be able to say > something like "Internal Error" and log it, and then terminate. Perhaps I have the special exception case. Consider my hypothetical scenario: I'm writing a network server. It's a Unix daemon. It has no windows, and it responds to no keyboard or mouse events. It has no input or output terminals. It writes no log files. It has no interface whatsoever for users to interact with it directly. If it encounters a fatal exception condition, it will send a well-formed notification message to a remote management system and execute a reasonably graceful termination. If there is a programming error that prevents it from properly notifying its management system of a fatal exception condition, then I want a core file dropped into /tmp for later analysis. In actual fact, I'm writing a library that I hope will be useful in such daemons. The library is in an implementation of RFC 3195 "Reliable Delivery for syslog". I want to use the assert construct for testing the library. When the library is proven correct, I want to turn off the Assert_failure exceptions completely. How do I get what I want here? Do I just have to lump it? I can do the "assert (not true)" kludge... but I'm not sure what we're getting in trade for making me have to do that. -- j h woodyatt "...the antidote to misinformation is more information, not less." --vinton cerf ------------------- 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