From: jhargis at gmail dot com Operating system: Debian Linux 2.4.27-1-386 PHP version: 5.0.3 PHP Bug Type: Output Control Bug description: Exceptions in destructor cause non descript fatal
Description: ------------ When the destructor issues an exception, it goes unhandled (obviously), however tossing a fatal does not seem like the appropriate course of action. Fatal error: Exception thrown without a stack frame in Unknown on line 0 Reproduce code: --------------- <?php class MyClass { function __destruct(){ throw new Exception('fail'); } } $n = new MyClass(); ?> Expected result: ---------------- A warning? Something other than a non descriptive fatal. -- Edit bug report at http://bugs.php.net/?id=31304&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31304&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31304&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31304&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31304&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31304&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31304&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31304&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31304&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31304&r=support Expected behavior: http://bugs.php.net/fix.php?id=31304&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31304&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31304&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31304&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31304&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31304&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31304&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31304&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31304&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31304&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31304&r=mysqlcfg