Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45071 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91303 invoked from network); 24 Jul 2009 13:37:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2009 13:37:11 -0000 Authentication-Results: pb1.pair.com header.from=troelskn@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=troelskn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.210 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: troelskn@gmail.com X-Host-Fingerprint: 209.85.220.210 mail-fx0-f210.google.com Received: from [209.85.220.210] ([209.85.220.210:37125] helo=mail-fx0-f210.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/B9-39659-709B96A4 for ; Fri, 24 Jul 2009 09:37:11 -0400 Received: by fxm6 with SMTP id 6so1475791fxm.23 for ; Fri, 24 Jul 2009 06:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Q61cUvcK9Dyc5w5jsOpSU85obvjGLeMfdIXAGYbjKAM=; b=Zey1GwT2wUgdXzfa5Zd96n87At+aAmljfe7CgLvoObXq4ptXoLJREiBxIWTCnpzVrt AkozaxVdbt7q8JgLRYkgartuOSpN4PAWu3ucV3zZGLXw73wlBwOH+qlyobeXoNwGrosm EtXWCJq9b+1zM83oNWH4+AenbDdBVAU3fkk9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=C6WyfXRYTtYHPIlUsqTj58phNs9HHaHFpfBOhVfKixXc48+Hdh4lV7l+3KiPKucWL2 yl1RYVsMZOUkXH8w5qxEZiY7yH8NtfWakzrNcJhEu15KICnOR5xOogLpMSZGuFeMZXAb Xd87ftqud5BfFFd4KHeDkrPtZ5JTIpJySg17Y= MIME-Version: 1.0 Received: by 10.204.118.70 with SMTP id u6mr3219161bkq.198.1248442628540; Fri, 24 Jul 2009 06:37:08 -0700 (PDT) In-Reply-To: References: Date: Fri, 24 Jul 2009 15:37:08 +0200 Message-ID: <98b8086f0907240637g5dcd7787g3e9c01df8dcd1f16@mail.gmail.com> To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: troelskn@gmail.com (troels knak-nielsen) On Fri, Jul 24, 2009 at 3:23 PM, wrote: > I published a (work in progress) RFC today about replacing certain > errors with exceptions. I know that there already was something similiar > on the php6dev blog, but this is not completly the same, so awating your > comments: > > http://wiki.php.net/rfc/errors_as_exceptions Maybe I'm missing the point somewhere, but isn't this as simple as installing an error-handler with set_error_handler? You can install a global handler, that throws ErrorException, if you want that. The example mentioned in the rfc - simplexml_load_file - is a bit special. If you load an invalid file, you may get more than one error. If these were converted into exceptions, you would miss all but the first. > user@domain.invalid whois -- troels