Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Marcus Börger
Hello Cristiano, Wednesday, August 6, 2003, 2:15:39 AM, you wrote: CD> Hi all, CD> I know there was a lot of discussion about try/catch, but I will bring it up CD> again: CD> What about finally ? There's absolute no need for finally: try { } catch (...) { } // here's you're finally code --

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Wez Furlong
The most important thing missing from this is that you cannot rethrow the exception from the point where you suggest to place the finally code :-) --Wez. > There's absolute no need for finally: > > try { > } > catch (...) { > } > // here's you're finally code -- PHP Internals - PHP Runtime De

Re[2]: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Marcus, Wednesday, August 6, 2003, 1:14:10 PM, you wrote: CD>> What about finally ? MB> There's absolute no need for finally: MB> try { MB> } MB> catch (...) { MB> } MB> // here's you're finally code try { $this->allocateSomeResources(); throw new SomeException(); } catch( AnotherE

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Jeff Moore
On Wednesday, August 6, 2003, at 03:14 AM, Marcus Börger wrote: There's absolute no need for finally: PHP doesn't necessarily control every resources you might want to deallocate. mysql_query('LOCK ...'); try { ... do stuff } finally { mysql_query('UNLOCK...'); } .. do more stuf

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Cristiano, Wednesday, August 6, 2003, 6:15:39 AM, you wrote: It would be much better if user will have to put method's throws in method's declaration imho( see my reply to Marcus ). -- Best regards, Simeonmailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runt

Re: [PHP-DEV] try/catch/FINALLY

2003-08-06 Thread Timm Friebe
On Wed, 2003-08-06 at 09:14, Marcus Börger wrote: > Hello Cristiano, [...] > There's absolute no need for finally: > > try { > } > catch (...) { > } > // here's you're finally code Well, consider: function foo() { try { // ... } catch (Exception $e) { // ...handle it... return fa

[PHP-DEV] try/catch/FINALLY

2003-08-05 Thread Cristiano Duarte
Hi all, I know there was a lot of discussion about try/catch, but I will bring it up again: What about finally ? I know someone posted that finally isn't necessary since PHP destroy all variables and releases all resources at the end of the script. But if the script is a PHP-GTK application or a