Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-08 Thread Greg Beaver
Ben Scholzen 'DASPRiD' wrote: > > I tested libxml_use_internal_errors() with XMLReader now, and it doesn't > really work as intended. When calling $reader->read(), and reaching an > invalid node, there is in fact the error stored in libxml_get_errors(), > but PHP additionally still throws a "parse

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-08 Thread Ben Scholzen 'DASPRiD'
Hannes Magnusson wrote on 30.07.2009 10:48: > Are you intentionally ignoring what I've said previously in the thread? > Please stop using SimpleXML as an example. You do not need @. > libxml_use_internal_errors(true); > $sxe = simplexml_load_string(""); > if (!$sxe) { > echo "Failed loading XML\

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-05 Thread Ben Scholzen 'DASPRiD'
Hannes Magnusson wrote on 31.07.2009 11:35: > I'll add some "see also" links and add an "errors" section mentioning it too. > > -Hannes Same for XMLReader then, please. -- ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-03 Thread Alban
Le Fri, 31 Jul 2009 11:35:45 +0200, Hannes Magnusson a écrit : > I just realized we don't link to that function from the simplexml docs. > > I'll add some "see also" links and add an "errors" section mentioning it > too. > > -Hannes Thank you for the documentation :) -- PHP Internals - PHP Ru

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-31 Thread Hannes Magnusson
On Thu, Jul 30, 2009 at 23:17, Markus Fischer wrote: > Hannes Magnusson wrote: >> On Thu, Jul 30, 2009 at 20:28, Joey Smith wrote: >>> However, now that it's come up, I'm wondering what the costs/risks are >>> of setting libxml_use_internal_errors() on by default? >> >> I don't think thats a good i

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Alban
>Le Thu, 30 Jul 2009 10:48:49 +0200, Hannes Magnusson a écrit : > > Are you intentionally ignoring what I've said previously in the thread? > Please stop using SimpleXML as an example. You do not need @. libxml_use_internal_errors(true); > [...] > > Again. The examples you are looking for are ne

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Markus Fischer
Hannes Magnusson wrote: > On Thu, Jul 30, 2009 at 20:28, Joey Smith wrote: >> However, now that it's come up, I'm wondering what the costs/risks are >> of setting libxml_use_internal_errors() on by default? > > I don't think thats a good idea. > People are used to getting a warning when stuff fail

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Hannes Magnusson
On Thu, Jul 30, 2009 at 20:28, Joey Smith wrote: > However, now that it's come up, I'm wondering what the costs/risks are > of setting libxml_use_internal_errors() on by default? I don't think thats a good idea. People are used to getting a warning when stuff fails, and suppressing them all of the

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Joey Smith
On Thu, Jul 30, 2009 at 10:48:49AM +0200, Hannes Magnusson wrote: > No PHP warnings at all. > > > Again. The examples you are looking for are network issues with > fopen(), file_get_contents() and such things. > > -Hannes Hannes, these are actually the ones I had in mind when I sent my last ema

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Hannes Magnusson
On Wed, Jul 29, 2009 at 23:33, Alban wrote: > Le Fri, 24 Jul 2009 15:23:21 +0200, user a écrit : > >> 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

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-29 Thread Joey Smith
On Wed, Jul 29, 2009 at 05:33:18PM -0400, Alban wrote: > The result is it's impossible to use this function without @ statement. SimpleXML is hardly alone here, but I would imagine that if we could identify these and get bugs opened on them, there'd be very little resistance to fixing that aspect.

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-29 Thread Brian Moon
Le Fri, 24 Jul 2009 15:23:21 +0200, user a écrit : 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/r

[PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-29 Thread Alban
Le Fri, 24 Jul 2009 15:23:21 +0200, user a écrit : > 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