|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31304 Exceptions in destructor cause non descript fatal
Submitted: 2004-12-26 17:06 UTC Modified: 2011-01-16 22:19 UTC
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:1 (12.5%)
Same OS:4 (50.0%)
From: jhargis at gmail dot com Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 5.0.3 OS: Debian Linux 2.4.27-1-386
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jhargis at gmail dot com
New email:
PHP Version: OS:


 [2004-12-26 17:06 UTC] jhargis at gmail dot com
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:
class MyClass {
  function __destruct(){
    throw new Exception('fail');
$n = new MyClass();

Expected result:
A warning?  Something other than a non descriptive fatal.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-10 22:00 UTC]
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 ?

 [2005-01-31 22:28 UTC]
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.

 [2011-01-16 22:19 UTC]
-Status: No Feedback +Status: Duplicate
 [2011-01-16 22:19 UTC]
See bug #47143
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC