Re: exceptions question

From: Date: Tue, 08 Jul 2003 17:45:57 +0000
Subject: Re: exceptions question
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-3306@lists.php.net to get a copy of this message
> 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.

« previous php.internals (#3306) next »