Re: Exception thrown without a stack frame
| From: | Ralph Schindler | Date: | Sat, 30 Jun 2007 15:18:40 +0000 |
| Subject: | Re: Exception thrown without a stack frame | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-30379@lists.php.net to get a copy of this message | ||
I've run into this before.. essentially, you can't do that ;)
http://us2.php.net/language.oop5.decon (second note)
Nor, can you throw exceptions anytime after the engine starts shutting down.
-ralph
Jakob Buchgraber wrote:
Okay, I can now reproduce the problem. Here is the code:
<?php
class Foo {
public function __destruct() {
throw new Exception();
}
}
$a = new Foo();
?>
I couldn't reproduce it before as I didn't assign the instance of Foo to a variable, however Christian Hoffmann pointed me out that I need to do this in order to get the desired error.
- Jakob