lib/ezutils/classes/ezmodule.php
function handleError( $errorCode, $errorType = false, $parameters = array(), $userParameters = false )
    {
        if ( self::$useExceptions && $errorType === "kernel" )
        {
            switch ( $errorCode )
            {
                case eZError::KERNEL_MODULE_NOT_FOUND:
                    throw new ezpModuleNotFound( $parameters["module"] );

                case eZError::KERNEL_MODULE_DISABLED:
                    if ( $parameters["check"]["view_checked"] )
                        throw new ezpModuleViewDisabled( $parameters["check"]['module'], $parameters["check"]['view'] );

                    throw new ezpModuleDisabled( $parameters["check"]['module'] );

                case eZError::KERNEL_MODULE_VIEW_NOT_FOUND:
                    throw new ezpModuleViewNotFound( $parameters["check"]['module'], $parameters["check"]['view'] );

                case eZError::KERNEL_ACCESS_DENIED:
                    throw new ezpAccessDenied;

                //case eZError::KERNEL_MOVED:
                // @todo ?

                case eZError::KERNEL_NOT_AVAILABLE:
                case eZError::KERNEL_NOT_FOUND:
                    throw new ezpContentNotFoundException( "" );

                case eZError::KERNEL_LANGUAGE_NOT_FOUND:
                        throw new ezpLanguageNotFound;
            }
        }

        if ( !$errorType )
        {
            eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.", __METHOD__ );
            $errorType = 'kernel';
        }
        $errorModule = $this->errorModule();

        $module = self::findModule( $errorModule['module'], $this );

        if ( $module === null )
        {
            return false;
        }

        $result = $module->run( $errorModule['view'], array( $errorType, $errorCode, $parameters, $userParameters ) );
        // The error module may want to redirect to another URL, see error.ini
        if ( $this->exitStatus() != self::STATUS_REDIRECT and
             $this->exitStatus() != self::STATUS_RERUN )
        {
            $this->setExitStatus( self::STATUS_FAILED );
            $this->setErrorCode( $errorCode );
        }
        return $result;
    }
function handleError( $errorCode, $errorType = false, $parameters = array(), $userParameters = false )
    {
        if ( self::$useExceptions && $errorType === "kernel" )
        {
            switch ( $errorCode )
            {
                case eZError::KERNEL_MODULE_NOT_FOUND:
                    throw new ezpModuleNotFound( $parameters["module"] );

                case eZError::KERNEL_MODULE_DISABLED:
                    if ( $parameters["check"]["view_checked"] )
                        throw new ezpModuleViewDisabled( $parameters["check"]['module'], $parameters["check"]['view'] );

                    throw new ezpModuleDisabled( $parameters["check"]['module'] );

                case eZError::KERNEL_MODULE_VIEW_NOT_FOUND:
                    throw new ezpModuleViewNotFound( $parameters["check"]['module'], $parameters["check"]['view'] );

                case eZError::KERNEL_ACCESS_DENIED:
                    throw new ezpAccessDenied;

                //case eZError::KERNEL_MOVED:
                // @todo ?

                case eZError::KERNEL_NOT_AVAILABLE:
                case eZError::KERNEL_NOT_FOUND:
                    throw new ezpContentNotFoundException( "" );

                case eZError::KERNEL_LANGUAGE_NOT_FOUND:
                        throw new ezpLanguageNotFound;
            }
        }

        if ( !$errorType )
        {
            eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.", __METHOD__ );
            $errorType = 'kernel';
        }
        $errorModule = $this->errorModule();

        $module = self::findModule( $errorModule['module'], $this );

        if ( $module === null )
        {
            return false;
        }

        $result = $module->run( $errorModule['view'], array( $errorType, $errorCode, $parameters, $userParameters ) );
        // The error module may want to redirect to another URL, see error.ini
        if ( $this->exitStatus() != self::STATUS_REDIRECT and
             $this->exitStatus() != self::STATUS_RERUN )
        {
            $this->setExitStatus( self::STATUS_FAILED );
            $this->setErrorCode( $errorCode );
        }
        return $result;
    }
function handleError ( $ errorCode , $ errorType = false , $ parameters = array ( ) , $ userParameters = false ) { if ( self :: $ useExceptions && $ errorType === "kernel" ) { switch ( $ errorCode ) { case eZError :: KERNEL_MODULE_NOT_FOUND : throw new ezpModuleNotFound ( $ parameters [ "module" ] ) ; case eZError :: KERNEL_MODULE_DISABLED : if ( $ parameters [ "check" ] [ "view_checked" ] ) throw new ezpModuleViewDisabled ( $ parameters [ "check" ] [ 'module' ] , $ parameters [ "check" ] [ 'view' ] ) ; throw new ezpModuleDisabled ( $ parameters [ "check" ] [ 'module' ] ) ; case eZError :: KERNEL_MODULE_VIEW_NOT_FOUND : throw new ezpModuleViewNotFound ( $ parameters [ "check" ] [ 'module' ] , $ parameters [ "check" ] [ 'view' ] ) ; case eZError :: KERNEL_ACCESS_DENIED : throw new ezpAccessDenied ; //case eZError::KERNEL_MOVED: // @todo ? case eZError :: KERNEL_NOT_AVAILABLE : case eZError :: KERNEL_NOT_FOUND : throw new ezpContentNotFoundException ( "" ) ; case eZError :: KERNEL_LANGUAGE_NOT_FOUND : throw new ezpLanguageNotFound ; } } if ( ! $ errorType ) { eZDebug :: writeWarning ( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code." , __METHOD__ ) ; $ errorType = 'kernel' ; } $ errorModule = $ this -> errorModule ( ) ; $ module = self :: findModule ( $ errorModule [ 'module' ] , $ this ) ; if ( $ module === null ) { return false ; } $ result = $ module -> run ( $ errorModule [ 'view' ] , array ( $ errorType , $ errorCode , $ parameters , $ userParameters ) ) ; // The error module may want to redirect to another URL, see error.ini if ( $ this -> exitStatus ( ) != self :: STATUS_REDIRECT and $ this -> exitStatus ( ) != self :: STATUS_RERUN ) { $ this -> setExitStatus ( self :: STATUS_FAILED ) ; $ this -> setErrorCode ( $ errorCode ) ; } return $ result ; }
Runs the defined error module
Sets the state of the module object to \c failed and sets the error code.

@param mixed $errorCode
@param mixed $errorType
@param array $parameters
@param mixed $userParameters

@see setErrorModule(), errorModule()
Runs the defined error module Sets the state of the module object to \ c failed and sets the error code .