Re: Exceptions disappear when thrown in callback
| From: | Andrei Zmievski | Date: | Fri, 17 Mar 2006 22:02:20 +0000 |
| Subject: | Re: Exceptions disappear when thrown in callback | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2646@lists.php.net to get a copy of this message | ||
First of all, using the word "crash" is not correct. PHP would exit cleanly on uncaught exception, shutting down all open resources. All of the signal handlers attached to 'destroy' signals will be called also.
-Andrei
On Mar 17, 2006, at 6:04 AM, Scott Mattocks wrote:
No, I don't have a better idea but just killing the main loop seems kind of harsh to me. Do you really want the entire program to crash because there was an uncaught exception in a callback? What about all of the signal handlers attached to destroy? How will they be called? An application will not be able to shut down cleanly. That could lead to some serious trouble (files not closed properly, connections abruptly terminated, data loss...). If the callback passed to set_exception_handler() could be used before the loop is terminated, I think that would at least give the application the chance to shut down properly. --Scott Mattocks http://www.crisscott.com --PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php