|
Posted by Bruno Rafael Moreira de Barros on 01/14/08 11:29
On Jan 14, 11:17 am, flowover <flowover...@gmail.com> wrote:
> http://ca.php.net/manual/en/language.exceptions.php
>
> On Jan 14, 3:08 am, Bruno Rafael Moreira de Barros
>
> <brunormbar...@gmail.com> wrote:
> > function test1() {
> > trigger_error('My error');
>
> > }
>
> > application.php
>
> > //code...
> > test1();
> > //code...
>
> > I want the trigger_error to say the error came from application.php
> > and the line where it came from. I have a custom error handler, so if
> > some change on the error handler (or test1(), for that matter) is
> > needed, I will gladly do it.
>
> > PHP does it, when you call any PHP function and it errors, it says it
> > came from the file that called it. In my own functions, it says it
> > came from the declaration... which is kind of useless because that is
> > what I already know... but when in the application it happened...
> > that's what's hard to find out.
So I would do:
try {
//code...
test1();
//code...
} catch...
Is that right?
Navigation:
[Reply to this message]
|