trigger error and set error handling in an object

From: Date: Wed, 02 Apr 2003 12:17:37 +0000
Subject: trigger error and set error handling in an object
Groups: php.general 
Request: Send a blank email to php-general+get-141969@lists.php.net to get a copy of this message
hi guys i am having an issue getting a set error handler to get a function within a class, i am also having problems trying to trigger the error, i dont want fatals or the error handler wont catch it anyway , but user or message picks up annoying messages like undefined index on variable , how can i achieve this properly this seems to work within the constructor set_error_handler(array(&$this, 'myErrorHandler')); but this way only works in 4.3 ? i need it backwards compatible trigger_error ("Cannot divide by zero", E_USER_WARNING); this is the trigger function myErrorHandler ($errno, $errstr, $errfile, $errline, $context) { plus this , is errrno supposed to return the error type or a code sorry to e vague its late

« previous php.general (#141969) next »