{"record":{"id":"68c68b24aa499c2f","repo":"octobercms/october","slug":"cms-lang-asset-error-deleting-file","errorCode":null,"errorMessage":"cms::lang.asset.error_deleting_file","messagePattern":"cms::lang\\.asset\\.error_deleting_file","errorType":"exception","errorClass":"October\\Rain\\Exception\\ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/tailor/classes/Blueprint.php","lineNumber":534,"sourceCode":"     */\n    public function forceSave()\n    {\n        return $this->save(['force' => true]);\n    }\n\n    /**\n     * delete template\n     */\n    public function delete()\n    {\n        $fileName = $this->fileName;\n        $fullPath = $this->getFilePath($fileName);\n\n        $this->validateFileName($fileName);\n\n        if (File::exists($fullPath)) {\n            if (!@File::delete($fullPath)) {\n                throw new ApplicationException(Lang::get(\n                    'cms::lang.asset.error_deleting_file',\n                    ['name' => $fileName]\n                ));\n            }\n        }\n    }\n\n    /**\n     * validateFileName, extension and path.\n     * @param string $fileName\n     */\n    protected function validateFileName(?string $fileName = null): void\n    {\n        if ($fileName === null) {\n            $fileName = $this->fileName;\n        }\n\n        $fileName = trim($fileName);","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/classes/Blueprint.php#L516-L552","documentation":"Error \"cms::lang.asset.error_deleting_file\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/tailor/classes/Blueprint.php:534 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":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}