Re: Restore output buffer in case of exceptions
| From: | Edward Z. Yang | Date: | Sun, 18 Nov 2007 01:06:16 +0000 |
| Subject: | Re: Restore output buffer in case of exceptions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33229@lists.php.net to get a copy of this message | ||
Evert | Rooftop wrote:
> Generally I make sure that the parts of my code that start an output
> buffer are also responsible for closing the output buffer.. so something
> like this wouldn't be uncommon in my code..
Agreed. If you'd like to implement transaction support using PHP's
exceptions, you'll need to implement rollback functionality yourself in
the catch block.
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]