TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KURT KUZBA
from: JERRY COFFIN
date: 1997-04-23 08:24:00
subject: self-destruct

On (20 Apr 97) Kurt Kuzba wrote to Thomas Maeder...
 KK>    Doesn't new already return NULL, or 0, on failure?
No.
 KK> It does in VC++ 4.0.
It certainly shouldn't, at least by default.  It should throw an
exception upon failure.  Offhand I'm not certain what it does if you
disable exception handling completely, but at that point we're certainly
no longer talking about what it "should" do (according to the draft
standard) we're only talking about what one particular implementation
does.
To be more accurate, when new fails, it calls the new handler function,
and the default new handler function is what throws the exception.  This
does mean that it's easy to change things so it doesn't throw an
exception anymore, if you prefer.
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.