Edit report at http://bugs.php.net/bug.php?id=31304&edit=1
ID: 31304 Updated by: [email protected] Reported by: jhargis at gmail dot com Summary: Exceptions in destructor cause non descript fatal -Status: No Feedback +Status: Duplicate Type: Bug Package: Scripting Engine problem Operating System: Debian Linux 2.4.27-1-386 PHP Version: 5.0.3 Block user comment: N Private report: N New Comment: See bug #47143 Previous Comments: ------------------------------------------------------------------------ [2005-01-31 22:28:36] [email protected] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2005-01-10 22:00:37] [email protected] Throwing an exception is fatal error by it's nature. The error message clearly says what's wrong. Why do you expect warning or anything else ? ------------------------------------------------------------------------ [2004-12-26 17:06:23] jhargis at gmail dot com 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 this bug report at http://bugs.php.net/bug.php?id=31304&edit=1
