From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-07-28 21:33:13
On Mon, Jul 28, 2008 at 5:57 PM, David Abrahams <dave_at_[hidden]> wrote:
> You might notice that I said "exceptions are for failure to satisfy
> postconditions" above :-)
> That said, they're really for avoiding failure, as noted in this message.
>> There are different kinds of failures,
> Radically. And people tend to collapse them in their minds.
Yes, you're right to be concerned about this.
>> but despite the differences there is some commonality between asserts,
>> static asserts, exceptions, signals, std::cerr, logging, abort(),
>> exit(), etc. Naming a category "error reporting" seems to capture
>> that, and it seems more descriptive than "miscellaneous" (and from
>> that point of view static assert would belong to both "error
>> reporting" and "program validation and testing".)
> How about "diagnostics?"
You're right that "diagnostics" describes the commonality I was
talking about better, but it implies that the failure at hand is
abnormal, that something is broken and needs to be fixed.
Throwing an exception doesn't necessarily indicate abnormality, in
fact the program might rely on the exception to operate properly (for
example, if you're processing a sequence of files, you might want to
catch(eof &) and open the next file to be processed.)
So I think that "reporting" fits better, since it's more neutral than
Reverge Studios, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk