public static function set($strName, $intLevel = null)
    {
        if (!is_null(self::$intStoredErrorLevel)) {
            throw new Caller('Error handler is already currently overridden.  Cannot override twice.  Call RestoreErrorHandler before calling SetErrorHandler again.');
        }
        if (!$strName) {
            // No Error Handling is wanted -- simulate a "On Error, Resume" type of functionality
            set_error_handler('\QCubed\ErrorHandler::HandleError', 0);
            self::$intStoredErrorLevel = error_reporting(0);
        } else {
            set_error_handler($strName, $intLevel);
            self::$intStoredErrorLevel = -1;
        }
    }
public static function set($strName, $intLevel = null)
    {
        if (!is_null(self::$intStoredErrorLevel)) {
            throw new Caller('Error handler is already currently overridden.  Cannot override twice.  Call RestoreErrorHandler before calling SetErrorHandler again.');
        }
        if (!$strName) {
            // No Error Handling is wanted -- simulate a "On Error, Resume" type of functionality
            set_error_handler('\QCubed\ErrorHandler::HandleError', 0);
            self::$intStoredErrorLevel = error_reporting(0);
        } else {
            set_error_handler($strName, $intLevel);
            self::$intStoredErrorLevel = -1;
        }
    }
public static function set ( $ strName , $ intLevel = null ) { if ( ! is_null ( self :: $ intStoredErrorLevel ) ) { throw new Caller ( 'Error handler is already currently overridden.  Cannot override twice.  Call RestoreErrorHandler before calling SetErrorHandler again.' ) ; } if ( ! $ strName ) { // No Error Handling is wanted -- simulate a "On Error, Resume" type of functionality set_error_handler ( '\QCubed\ErrorHandler::HandleError' , 0 ) ; self :: $ intStoredErrorLevel = error_reporting ( 0 ) ; } else { set_error_handler ( $ strName , $ intLevel ) ; self :: $ intStoredErrorLevel = - 1 ; } }
Temprorarily overrides the default error handling mechanism.  Remember to call
RestoreErrorHandler to restore the error handler back to the default.

@param string $strName the name of the new error handler function, or NULL if none
@param integer $intLevel if a error handler function is defined, then the new error reporting level (if any)

@throws Caller
@was QApplication::SetErrorHandler
Temprorarily overrides the default error handling mechanism . Remember to call RestoreErrorHandler to restore the error handler back to the default .