delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/03/14:55:20

Message-ID: <3754FA2C.54A26758@softhome.net>
From: Chris Mears <chris_mears AT softhome DOT net>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: new's return on fail
Lines: 9
Date: Wed, 02 Jun 1999 19:32:28 +1000
NNTP-Posting-Host: 139.134.194.96
X-Trace: newsfeeds.bigpond.com 928315540 139.134.194.96 (Wed, 02 Jun 1999 19:25:40 EST)
NNTP-Posting-Date: Wed, 02 Jun 1999 19:25:40 EST
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all...

What does new return if it fails?  I've heard that the standard requires
that it throw an exception, but also I've heard that it returns NULL
(like malloc).  I did a test, and it did neither, preferring to exit the
program.  So, how do I capture this and use it for the greater good
(rather than just exiting the program)?

Chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019