Re: [PHP-DEV] Exceptions Vs Errors

2012-09-04 Thread Alex Aulbach
2012/9/3 Lester Caine : > more ... try/catch always seems like 'I can't be bothered so just do this if > you can' where it would be much tidier if file_put_contents(); was written > so it simply finished with an error if it has a problem? Hm. I want to bring in some thoughts. Perhaps I have not t

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Lester Caine
Rasmus Lerdorf wrote: On 09/01/2012 06:39 PM, Anthony Ferrara wrote: So, while I know there's some discontent about having the core raise exceptions, let me ask the question differently: Without moving to exceptions, how could the current error and error handling mechanisms be improved to make

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Laruence
On Sun, Sep 2, 2012 at 9:39 AM, Anthony Ferrara wrote: > Hi all, > > There's been a lot of discussion around whether or not to include > exceptions for core (no class implementations) errors or not. There's been > a lot said on both sides. However, I'd like to pose the question from a > different

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Rasmus Lerdorf
On 09/01/2012 06:39 PM, Anthony Ferrara wrote: > So, while I know there's some discontent about having the core raise > exceptions, let me ask the question differently: > > Without moving to exceptions, how could the current error and error > handling mechanisms be improved to make the scenario I

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Anthony Ferrara
Derick, On Sun, Sep 2, 2012 at 1:12 PM, Derick Rethans wrote: > On Sun, 2 Sep 2012, Anthony Ferrara wrote: > > > > I don't wish to derail this thread from the get-go, but what's your > > > opposition to moving to exceptions? > > > > I'm absolutely for moving to exceptions. I asked this question

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Derick Rethans
On Sun, 2 Sep 2012, Anthony Ferrara wrote: > > I don't wish to derail this thread from the get-go, but what's your > > opposition to moving to exceptions? > > I'm absolutely for moving to exceptions. I asked this question as a > thought exercise to see 1. If the current error system can be improv

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Anthony Ferrara
Andrew: I don't wish to derail this thread from the get-go, but what's your > opposition to moving to exceptions? I'm absolutely for moving to exceptions. I asked this question as a thought exercise to see 1. If the current error system can be improved, or 2. To identify if it can't, and excepti

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Gustavo Lopes
On Sun, 02 Sep 2012 03:39:15 +0200, Anthony Ferrara wrote: So, while I know there's some discontent about having the core raise exceptions, let me ask the question differently: Without moving to exceptions, how could the current error and error handling mechanisms be improved to make the sce

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Andrew Faulds
On 02/09/12 02:39, Anthony Ferrara wrote: Right now, I see the biggest problem with errors currently in PHP is that there's no easy way of discerning between error types to be able to handle them. Therefore it's easier to ignore the error than it is to handle it bluntly. For example, I may want t

[PHP-DEV] Exceptions Vs Errors

2012-09-01 Thread Anthony Ferrara
Hi all, There's been a lot of discussion around whether or not to include exceptions for core (no class implementations) errors or not. There's been a lot said on both sides. However, I'd like to pose the question from a different angle. Right now, I see the biggest problem with errors currently