Re: finally again

From: Date: Fri, 07 Nov 2003 16:26:03 +0000
Subject: Re: finally again
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5316@lists.php.net to get a copy of this message
Cristiano Duarte wrote: > Since we don't have finally, the current code is: In PHPUnit I use the following code public function runBare() { $catchedException = null; $this->setUp(); try { $this->runTest(); } catch (Exception $e) { $catchedException = $e; } $this->tearDown(); // Workaround for missing "finally". if ($catchedException !== null) { throw $catchedException; } } Works fine for me [tm]. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

« previous php.internals (#5316) next »