Browse thread
[Caml-list] assertions and branch prediction
-
james woodyatt
-
Xavier Leroy
-
james woodyatt
-
Mattias Waldau
- james woodyatt
-
Mattias Waldau
-
james woodyatt
-
Xavier Leroy
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | james woodyatt <jhw@w...> |
| Subject: | Re: [Caml-list] assert false and -noassert |
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