Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33226 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34894 invoked by uid 1010); 17 Nov 2007 23:15:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34878 invoked from network); 17 Nov 2007 23:15:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 23:15:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.162.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.162.182 el-out-1112.google.com Linux 2.4/2.6 Received: from [209.85.162.182] ([209.85.162.182:62094] helo=el-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/62-14070-3067F374 for ; Sat, 17 Nov 2007 18:15:16 -0500 Received: by el-out-1112.google.com with SMTP id r27so621518ele for ; Sat, 17 Nov 2007 15:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=FGwmQZn6JZ5surTQvWvKZAE0HI/cq/QdvmaSdgkh96I=; b=M0d0Ue69RmHAIlViVtkQzusOxM/7aDxtOyhXpodnlOwLCyghENJZJVcZSB5aVxilI9qNdfVHQcXn0fc3aWIizPTSkeIn/9DFTnwGIU2y7xRXbH/vYhF1904pKIwTtkw5v8zN/f0uTJu9RyH0exPpOHzNm0ERmbI/JIRGPiv000s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Lx+RkkZnRrvli9rJX3CEwjzyXiZScHFbyI4MT9l7MgS3Pyy2BL7KOLBUguDIkMtN712hnJFyfRVKI85xNsi0dsMzxU/urv+S/LMw/ExNW1yYKdCs4455UPqJiWC4DMysv1OBVepC8YBMhINSafjJrFBaMzKN97HDM5j/Enq9RRQ= Received: by 10.150.153.19 with SMTP id a19mr466560ybe.1195341313739; Sat, 17 Nov 2007 15:15:13 -0800 (PST) Received: by 10.150.52.9 with HTTP; Sat, 17 Nov 2007 15:15:13 -0800 (PST) Message-ID: Date: Sun, 18 Nov 2007 02:15:13 +0300 To: "Antony Dovgal" Cc: "Mehmet Yavuz Selim Soyturk" , internals@lists.php.net In-Reply-To: <473F6E02.7080003@daylessday.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1abd9eb20711171436w4b797bffu4cab758407beebf6@mail.gmail.com> <473F6E02.7080003@daylessday.org> Subject: Re: [PHP-DEV] Restore output buffer in case of exceptions From: indeyets@gmail.com ("Alexey Zakhlestin") On 11/18/07, Antony Dovgal wrote: > On 18.11.2007 01:36, Mehmet Yavuz Selim Soyturk wrote: > > That is the idea: > > > > > > > exceptional_ob_start(); > > > > echo "Begin\n"; > > try { > > echo "Exception\n"; > > throw new Exception(); > > } catch (Exception $e) {} > > echo "End\n"; > > > > exceptional_ob_end_flush(); > > > > ?> > > > > And that would be the only output: > > > > Begin > > End > > > > Following this logic, we would also need to "unwind" all file descriptors, > database transactions, network connections etc. etc. > This makes no sense. This makes sense, but it's almost impossible to implement it this way :) On the other hand, implementing output-buffer the way it is proposed can actually be possible and it can be really useful edge-cases are not obvious, though -- Alexey Zakhlestin http://blog.milkfarmsoft.com/