From: Ogles, D. <DO...@pe...> - 2001-02-05 20:11:48
|
Well, IMHO the C++ way to do it would be using an exception. However, since CS doesn't use exception handling (for portability, mostly), you're out of luck. I suggest aborting the process or (preferably) moving your constructor code that may fail into a separate init() function, which returns success or failure. > -----Original Message----- > From: Rudolf Potucek [mailto:po...@uc...] > Sent: Sunday, February 04, 2001 3:20 PM > To: cry...@li... > Subject: [CsMain] How to make constructor fail? > > > > Ok, I know this is out of context ... but could anyone tell me how I > make a constructor fail? Is there a clean way or is the only > possibility > to call exit() within the constructor if things go wrong? > > Rudolf > > > _______________________________________________ > Crystal-main mailing list > Cry...@li... > http://lists.sourceforge.net/lists/listinfo/crystal-main > |