exit in class constructor crashes
| From: | Daniel Convissor | Date: | Fri, 28 Jul 2000 19:38:46 +0000 |
| Subject: | exit in class constructor crashes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8841@lists.php.net to get a copy of this message | ||
Hey Y'all:
The constructor function in my class does a check to make sure things are set
up correctly. If they're not, I want the script to print an error message
and exit. But, calling exit() inside a constructor class causes PHP to
crash. *
Hunting through the PHP site and mailing list archives provided only one
message about this which was written one year ago. There was no follow up to
their post. Weird.
I want the check to happen automatically, w/o me or someone else having to
think about coding the check manually. If the check finds problems, I don't
want things going any farther.
What to do?
Enjoy,
--Dan
* Note: PHP 3.0.11 on Windows NT 4.0.
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409