Alan Pinstein wrote:

> Hi all-
>
> Ok, I am finishing up my first C++ Palm application, which is also my 1st
> C++ app, so these questions may be very newbie as far as C++ goes, but I
> know C very well.
>
> I've got a constructor that does some memory allocation and creates a
> record for the app, etc. I am now trying to add nice error handling if the
> alloc's fail in the constructor, and I am at a loss for how to do this. Is
> this where you use exceptions in C++? How does that work? I have dug
> through a couple of C++ books here, but they are pretty entry-level and
> don't deal with error handling in constructors.

Yes, exceptions are the go.

Have a look at Teenee for example usage of constructors and exceptions.

http://www.classactionpl.com/

--
Christopher Hunt
Class Action Pty. Ltd.

Are you a time zone traveler that owns a Palm(tm) connected organizer?
Check out http://www.classactionpl.com/TimeTraveler/index.htm

Reply via email to