caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: james woodyatt <jhw@wetware.com>
To: "Mattias Waldau" <mattias.waldau@abc.se>
Cc: "'The Trade'" <caml-list@inria.fr>
Subject: Re: [Caml-list] assert false and -noassert
Date: Mon, 25 Feb 2002 12:00:09 -0800	[thread overview]
Message-ID: <4522D3D1-2A2A-11D6-A21E-000502DB38F5@wetware.com> (raw)
In-Reply-To: <000001c1bd12$ceaab700$0700a8c0@gateway>

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 <jhw@wetware.com>
"...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


      reply	other threads:[~2002-02-25 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-15 17:01 [Caml-list] assertions and branch prediction james woodyatt
2002-02-18 14:00 ` Xavier Leroy
2002-02-20 16:35   ` [Caml-list] assert false and -noassert james woodyatt
2002-02-24  9:08     ` Mattias Waldau
2002-02-25 20:00       ` james woodyatt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4522D3D1-2A2A-11D6-A21E-000502DB38F5@wetware.com \
    --to=jhw@wetware.com \
    --cc=caml-list@inria.fr \
    --cc=mattias.waldau@abc.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).