Re: exceptions

Matt Kimball (robozapp@xmission.com)
Thu, 27 May 1999 20:14:12 -0600


On Thu, May 27, 1999 at 10:33:33AM -0700, Darren O. Benham wrote:
> are exceptions (try, catch, throw) part of the c++ subset abi is using?
> if not, what is the abi-prefered way to abort the contruction of a class
> if.. say.. there's not enough memory?

I don't speak for Abi, but according to the Programmer Guidelines in
the docs directory, you shouldn't use exceptions. From reading the
code, it seems to me that the standard way to deal with it is to not
allocate any memory in a constructor. Instead, just initialize to
some NULL state and then have an initialization function which can
return false if, say, memory allocation fails. Seems sensible to me.

-- 
Matt Kimball
mkimball@xmission.com


This archive was generated by hypermail 1.03b2.