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;
    }