{"record":{"id":"3815d0558a4b9c27","repo":"typecho/typecho","slug":"page-not-exists","errorCode":null,"errorMessage":"Page Not Exists","messagePattern":"Page Not Exists","errorType":"exception","errorClass":"Typecho\\Widget\\Exception","httpStatus":404,"severity":"error","filePath":"var/Typecho/Widget/Helper/PageNavigator.php","lineNumber":81,"sourceCode":"    /**\n     * 构造函数,初始化页面基本信息\n     *\n     * @param integer $total 记录总数\n     * @param integer $currentPage 当前页面\n     * @param integer $pageSize 每页记录数\n     * @param string $pageTemplate 页面链接模板\n     * @throws Exception\n     */\n    public function __construct(int $total, int $currentPage, int $pageSize, string $pageTemplate)\n    {\n        $this->total = $total;\n        $this->totalPage = ceil($total / $pageSize);\n        $this->currentPage = $currentPage;\n        $this->pageSize = $pageSize;\n        $this->pageTemplate = $pageTemplate;\n\n        if (($currentPage > $this->totalPage || $currentPage < 1) && $total > 0) {\n            throw new Exception('Page Not Exists', 404);\n        }\n    }\n\n    /**\n     * 设置页面占位符\n     *\n     * @param string $holder 页面占位符\n     */\n    public function setPageHolder(string $holder)\n    {\n        $this->pageHolder = ['{' . $holder . '}',\n            str_replace(['{', '}'], ['%7B', '%7D'], $holder)];\n    }\n\n    /**\n     * 设置锚点\n     *\n     * @param string $anchor 锚点","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/typecho/typecho/blob/56f4c6f33955a87969c399b5d5912d7f9fd7347c/var/Typecho/Widget/Helper/PageNavigator.php#L63-L99","documentation":"Error \"Page Not Exists\" thrown in typecho/typecho.","triggerScenarios":"Thrown at var/Typecho/Widget/Helper/PageNavigator.php:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"56f4c6f33955a87969c399b5d5912d7f9fd7347c","analyzedAt":"2026-08-21T01:52:37.175Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}