Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!van-bc!ubc-cs!kiwi!photon!murphy From: murphy@photon.mpr.ca (Gail Murphy) Newsgroups: comp.lang.c++ Subject: C++ Constructor Failing Message-ID: <2415@kiwi.mpr.ca> Date: 31 Oct 90 22:39:06 GMT Sender: news@eric.mpr.ca Reply-To: murphy@photon.mpr.ca Organization: MPR Teltech Ltd. Lines: 14 Is there a way to gracefully fail out of a C++ constructor ensuring all memory is tidied up? For instance, suppose class FOO takes two integer values in its constructor. For FOO to be validly defined, integer 1 must be less than integer 2. However, at some point, a FOO constructor is called with integer 2 greater than integer 1. How can this be caught and handled without exceptions? Can it? Gail Murphy | Voice : (604) 293-5462 MPR Teltech Ltd. | Fax : (604) 293-5787 8999 Nelson Way, Burnaby, BC | E-Mail: murphy@eric.mpr.ca Canada, V5A 4B5 | eric.mpr.ca!murphy@uunet.uu.net