Fail unresolved component renders with HTTP 500

This commit is contained in:
udo
2026-07-18 16:55:42 +00:00
parent 39d4b41e2b
commit 3cbe6f50d4
5 changed files with 29 additions and 0 deletions
+2
View File
@@ -17,6 +17,8 @@ Component props are passed through `context.props`, and `name:COMPONENTFUNC` may
When `name` starts with `:`, the runtime resolves that named handler against the current `.uce` file.
Calling a missing component or named component handler is a server error and sets HTTP status 500. Probe intentionally optional components with `component_exists()` before calling `component_render()`.
If the target file defines `ONCE(Request& context)`, that hook runs once per request before the file's first component or render entrypoint.
Use `component_render()` when you want to write component output directly from C++ code instead of capturing it as a `String`.