RES: set_error_handler help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oh Yes this helped, thanks a lot :)

I was missing the callback part ;)

Regards,
Thiago

-----Mensagem original-----
De: Jim Lucas [mailto:lists@xxxxxxxxx] 
Enviada em: sexta-feira, 2 de maio de 2008 15:26
Para: Thiago Pojda
Assunto: Re:  set_error_handler help

Thiago Pojda wrote:
> Hi guys,
> 
>  
> 
> I'm trying some custom error handling functions in order to get emails
when
> fatal errors come up in my production website. The thing is, I went to
> phpclasses and there was a good one, but it was a class.
> 
>  
> 
> I'm very slow today, so I could not figure out how to get it working. So,
I
> just removed it from the classs and used the function part. Which worked,
> but it got me confused:
> 
>  
> 
> Is there any way to use a class to handle errors? I've tried some stuff
like
> set_error_handler("Error_Handler::logError" and such, but with no luck.
> 
>  
> 
>  
> 
> Any hints?
> 
>  
> 
> Thanks! 
> 
> 

Go here

http://us2.php.net/set_error_handler

Notice that the first parameter can be a callback function.

Now click on call back and you will see how to setup an array with the 
object/method set so it will call a method within your object.

http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callba
ck

Hope that helps


-- 
Jim Lucas

    "Some men are born to greatness, some achieve greatness,
        and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
     by William Shakespeare





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux