Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45135 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92056 invoked from network); 30 Jul 2009 08:48:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2009 08:48:54 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.154 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.220.154 fg-out-1718.google.com Received: from [72.14.220.154] ([72.14.220.154:22029] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/12-16652-47E517A4 for ; Thu, 30 Jul 2009 04:48:53 -0400 Received: by fg-out-1718.google.com with SMTP id 13so1073477fge.0 for ; Thu, 30 Jul 2009 01:48:50 -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:cc:content-type :content-transfer-encoding; bh=ykmRB1DqfpRyuoJxVX+UfovzTKvZzEbNl2b5HSt8tuo=; b=qOBqM3i1D9G/52cY2PmPI6omKO7QLrQ1rKGn8Sua+5QkhwwrkyvV4/zwrZE6954gy5 gE4LDkKA6GB3nZLsqTsSJe42Li0XoYLcXv1x2WYuRoxQYVSi4plEC3t+FIUb2uS9FbDL FC36eUavXF9+DFpsEsIcTJheEZRPgX7eOAnh0= 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 :cc:content-type:content-transfer-encoding; b=VV0PHjJEBLCMTdwt/rdPzuUT+swRQzFF9ZkBjhiY+kbE0bhUd0CAoS1s4VS5o9WouV FX0KfBzstZ5zUMyx77/T80Od7uFRhinJBwcq+oxKs66KTvt6Pfo/rHgX+GJDcwy72IDH oP83j6TcYujSmOxOiNtGwKOvnqQa5nkKU8WyM= MIME-Version: 1.0 Received: by 10.86.91.14 with SMTP id o14mr323200fgb.33.1248943729946; Thu, 30 Jul 2009 01:48:49 -0700 (PDT) In-Reply-To: References: Date: Thu, 30 Jul 2009 10:48:49 +0200 Message-ID: <7f3ed2c30907300148k246bb727qe60b888ddfe5523f@mail.gmail.com> To: Alban Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Jul 29, 2009 at 23:33, Alban wrote: > Le Fri, 24 Jul 2009 15:23:21 +0200, user a =E9crit=A0: > >> 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 > > I'm agree for replacing error by exception. Even if this not a good idea, > i think there is a big problem with error gesture into php. > > Exemple : http://fr3.php.net/manual/en/function.simplexml-load-string.php [...] > The result is it's impossible to use this function without @ statement. Are you intentionally ignoring what I've said previously in the thread? Please stop using SimpleXML as an example. You do not need @. "); if (!$sxe) { echo "Failed loading XML\n"; foreach(libxml_get_errors() as $error) { echo "\t", $error->message; } } Outputs: Failed loading XML Blank needed here parsing XML declaration: '?>' expected Opening and ending tag mismatch: xml line 1 and broken Premature end of data in tag broken line 1 No PHP warnings at all. Again. The examples you are looking for are network issues with fopen(), file_get_contents() and such things. -Hannes