Re: commit (head)

From: Dom Lachowicz <domlachowicz_at_yahoo.com>
Date: Mon Oct 11 2004 - 22:09:08 CEST

Hi FJF,

> While I have no interest in throwing exceptions (and
> I'm glad it's not
> just me that has difficulty catching them sometimes)
> I do worry a
> little about "new" failing. What's the best way to
> handle this?

For the time being, we can make sure that all new's
are of the nothrow variety that will just return NULL
on error. What the best way to achieve that is, I'm
not entirely certain. It could be as simple as
#define'ing something in ut_types.h or which choosing
which C++ library we link against.

Personally, I don't see how caring about new failing
right now matters much to us. Pretty much without
fail, we assume that new succeeds within our codebase
(not that I'm condoning this reckless behavior; I'm
just stating the way things are). So unless some major
changes are made, this argument boils down to:

A) new throws exception, and is caught by some really
high-level exception handler or is uncaught and causes
us to abort.

B) new returns NULL, we dereference NULL, and is
caught by some really high-level signal() handler or
is uncaught and causes us to abort.

Six of one, a half-dozen of the other.

Best regards,
Dom

                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
Received on Mon Oct 11 22:08:13 2004

This archive was generated by hypermail 2.1.8 : Mon Oct 11 2004 - 22:08:13 CEST