[PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was displayed. eg. ?php function test() { user_error('whatever'); } test(); ?

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Ferenc Kovacs
On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote: If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was displayed.

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Bob Weinand
Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs tyr...@gmail.com: On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote: If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Thomas Anderson zeln...@gmail.com If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was displayed. eg. ?php function test()

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs tyr...@gmail.com: On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote: If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Bob Weinand
Am 7.5.2013 um 21:07 schrieb Sebastian Krebs krebs@gmail.com: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs tyr...@gmail.com: On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote: If you do user_error('whatever')

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 2:04 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/5/7 Thomas Anderson zeln...@gmail.com If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Adam Harvey
On 7 May 2013 12:24, Thomas Anderson zeln...@gmail.com wrote: I thought half the point of OOP was to abstract away the internals and as is the error messages don't make much sense unless you *do* consider the internals. Like let's say you have a bignum library and you're doing

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Thomas Anderson zeln...@gmail.com On Tue, May 7, 2013 at 2:04 PM, Sebastian Krebs krebs@gmail.comwrote: 2013/5/7 Thomas Anderson zeln...@gmail.com If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error()

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 21:07 schrieb Sebastian Krebs krebs@gmail.com: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs tyr...@gmail.com: On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote:

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 2:49 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 21:07 schrieb Sebastian Krebs krebs@gmail.com: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Bob Weinand
Am 7.5.2013 um 21:49 schrieb Sebastian Krebs krebs@gmail.com: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 21:07 schrieb Sebastian Krebs krebs@gmail.com: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs tyr...@gmail.com:

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Stas Malyshev
Hi! And today we have the problem that we cannot use in any useful manner trigger_error in libraries, when we don't know where the error originates from. You debug today trigger_error's in libraries with putting a debug_print_backtrace behind the trigger_error. I think you Why not use a

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Stas Malyshev
Hi! If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was displayed. eg. If you need additional information to accompany the error, why

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 3:14 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Stas Malyshev
Hi! So the error messages your library produces have the same consistent look and feel to them that PHP's errors do? While it may be nice, I don't think it is worth changing the PHP API for. Error messages have very defined api, which has the place in the source where they were actually

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 3:38 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! So the error messages your library produces have the same consistent look and feel to them that PHP's errors do? While it may be nice, I don't think it is worth changing the PHP API for. Error messages have

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Bob Weinand
Am 7.5.2013 um 22:11 schrieb Stas Malyshev smalys...@sugarcrm.com: Hi! And today we have the problem that we cannot use in any useful manner trigger_error in libraries, when we don't know where the error originates from. You debug today trigger_error's in libraries with putting a

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 22:11 schrieb Stas Malyshev smalys...@sugarcrm.com: Hi! And today we have the problem that we cannot use in any useful manner trigger_error in libraries, when we don't know where the error originates from. You debug today

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 4:30 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 22:11 schrieb Stas Malyshev smalys...@sugarcrm.com: Hi! And today we have the problem that we cannot use in any useful manner trigger_error in