> If I'm not mistaken set_error_handler() takes a string that 
> is the name of a function, I am sure in that function you 
> can instantiate whatever class you want.

After thinking about it some more, I'm doing this.  Not sure
if this is the best way to go about it, but it allows me to do
what I want:

<?

function errorWrapperFunction( ... error_handler_vars ... ) {
  
  global $ErrorClassName;

  $ErrorClassName->errorHandlerMethod( ... error_handler_vars ... );

}

class ErrorHandlerClass {

  // constructor
  function ErrorHandlerClass() {

    $GLOBALS["ErrorClassName"] = get_class( $this );

  }
}

$old_error_handler = set_error_handler( "errorWrapperFunction" );

?>

That way, I can still use my class to do everything else and handle
the errors when and where I need/want.

Chris

Reply via email to