Re: Possibility to add finally to try/catch?

From: Date: Tue, 28 Feb 2012 23:29:00 +0000
Subject: Re: Possibility to add finally to try/catch?
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-58308@lists.php.net to get a copy of this message
Hi!
As for implementation, would it be possible to hook into whatever PHP has in the way of frame disposal? That approach would have one of the same issues as the userland solution ("finally" blocks won't run until the current scope is exited), but is at least a partial solution. Would it be
No, "partial solution" is a no go. The solution should work like finally is expected to work - finally block executed after the control leaves try/catch/finally construct in any way. There are non-trivial things to solve there - like how to correctly pass control if we have multiple nested blocks or nested blocks inside finally, etc. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#58308) next »