{"record":{"id":"8ae631dff5fbd64a","repo":"getgrav/grav","slug":"e-getrawmessage","errorCode":null,"errorMessage":"$e->getRawMessage()","messagePattern":"\\$e->getRawMessage\\(\\)","errorType":"http","errorClass":"RuntimeException","httpStatus":400,"severity":"error","filePath":"system/src/Grav/Common/Twig/Twig.php","lineNumber":459,"sourceCode":"\n            // Editor-authored content Twig can assemble markup the raw-source\n            // validator can't see (`{{ \"on\" ~ \"error\" }}`, `<s{{ \"cript\" }}>`).\n            // That is caught at SAVE time now — Security::detectXssInEditorContent\n            // renders this same sandboxed pass in isolation and rejects the save —\n            // so there is no render-time output scan here. (GHSA-2c4f-86xc-cr74)\n\n            // Modular theme template render (loaded from disk) — trusted, not\n            // sandboxed by our SourcePolicy. The already-resolved content is\n            // handed in as the `content` variable; Twig emits it as a string\n            // and does not re-evaluate it.\n            if ($moduleTemplate && $item->isModule()) {\n                $twig_vars['content'] = $content;\n                $template = $this->getPageTwigTemplate($item);\n                $output = $local_twig->render($template, $twig_vars);\n            }\n\n        } catch (LoaderError $e) {\n            throw new RuntimeException($e->getRawMessage(), 400, $e);\n        }\n\n        if ($filtered) {\n            $output = $this->appendSandboxAdminHint($output);\n        }\n\n        return $output;\n    }\n\n    /**\n     * Process a Twig template directly by using a template name\n     * and optional array of variables\n     *\n     * @param string $template template to render with\n     * @param array  $vars     Optional variables\n     *\n     * @return string\n     */","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/Twig/Twig.php#L441-L477","documentation":"Error \"$e->getRawMessage()\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/Twig/Twig.php:459 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":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}