Re: Member function as error_handler

From: Date: Sun, 09 Mar 2003 17:40:25 +0000
Subject: Re: Member function as error_handler
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138867@lists.php.net to get a copy of this message
I'd recommend that you consider using the set_error_handler function. This'll let you create and use your own custom error handler function (which is fired for errors of the E_ERROR, E_WARNING and E_NOTICE type and also those errors that you deliberately trigger using trigger_error()) - very handy indeed! Of course rather than doing this on every page place such code in a single file and include this file (using the include construct or variation on this) within all your site pages. Hope this helps. David Eisenhart "Nik Makepeace" <nik@nikmakepeace.com> wrote in message news:1047212297.5097.24.camel@gruyere... > Query One: Can I use a member function of an object as an error_handler? > > I currently declare a function for error handling with every page, but I > would like to put it in an object which lives in the session anyway. The > problem is I can't seem to do it; when I try to set the error handler to > a method, it defaults to PHP's usual methods. Is it me or PHP? > > MTIA, > Nik > -- > http://travelog.uberblog.com/ >

« previous php.general (#138867) next »