> 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().
That is precisely how exceptions are supposed to work.
> Are we forced to use trigger_error() or some
> custom function for this kind of exception,
trigger_error() != exception.
> or is there a way to tell
> PHP 5 "go back, the exception is fixed"?
Nope. You need to use separate try/catch blocks if you need more
granularity.
try {
try {
do_something();
} catch (exception $e) {
// ignore it
}
do_something_else();
} catch (exception $e) {
var_dump($e);
}
--Wez.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php