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 wrote: > 2013/5/7 Bob Weinand > > > > > Am 7.5.2013 um 22:11 schrieb 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 er

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 > > Am 7.5.2013 um 22:11 schrieb 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 wit

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 : > 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

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 wrote: > 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

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 produ

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 wrote: > 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. >

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,

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 d

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 : > > > > 2013/5/7 Bob Weinand > > Am 7.5.2013 um 21:07 schrieb Sebastian Krebs : > >> >> >> >> 2013/5/7 Bob Weinand >> >> Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : >> >> > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson 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 wrote: > 2013/5/7 Bob Weinand > > > > > Am 7.5.2013 um 21:07 schrieb Sebastian Krebs : > > > > > > > > > > 2013/5/7 Bob Weinand > > > >> > >> Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : > >> > >> > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson

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 > > Am 7.5.2013 um 21:07 schrieb Sebastian Krebs : > > > > > 2013/5/7 Bob Weinand > >> >> Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : >> >> > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson >> wrote: >> > >> >> If you do user_error('whatever') it'll show, as the line numbe

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 > > > On Tue, May 7, 2013 at 2:04 PM, Sebastian Krebs wrote: > >> >> >> >> 2013/5/7 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 yo

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 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 > $fifteen->divide($zero) on

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 wrote: > > > > 2013/5/7 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

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 : > > > > 2013/5/7 Bob Weinand > > Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : > > > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson wrote: > > > >> If you do user_error('whatever') it'll show, as the line number for that > >> error, the line n

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 > > Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : > > > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson > 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 > >

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 > 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. > > function test() { > user_erro

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 : > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson 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 n

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 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. > eg. > > fun

[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. That'll say "Notice: whatever in ... on line 4" (ie. the line that the