RE: [PHP-DEV] exceptions question
| From: | Juan C. Rivera | Date: | Thu, 10 Jul 2003 00:57:32 +0000 |
| Subject: | RE: [PHP-DEV] exceptions question | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3341@lists.php.net to get a copy of this message | ||
You should not use exceptions for program logic. Exceptions are use to
handle exceptional cases and the overhead of handling an exception may
be quite expensive. At least on other languages.
So, what is the overhead of throwing exceptions in PHP? Is it as
expensive as in .Net or C++?
-----Original Message-----
From: Greg Beaver [mailto:greg@chiaraquartet.net]
Sent: Tuesday, July 08, 2003 1:30 PM
To: internals@lists.php.net
Subject: [PHP-DEV] exceptions question
Hi,
In experimenting with exceptions, I notice that throw() always jumps to
the first catch() (as expected), and there is no way to return to the
line after the throw(). Are we forced to use trigger_error() or some
custom function for this kind of exception, or is there a way to tell
PHP 5 "go back, the exception is fixed"?
Thanks,
Greg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php