#include "demo_guard.h" RENDER(Request& context) { if(!test_demo_request_allowed(context)) { test_demo_render_restricted_html(context, "Error reporting", "intentionally crash or abort request workers"); return; } String mode = context.get["mode"]; if(mode == "exception") throw std::runtime_error("Intentional test exception from /test/error-reporting.uce"); if(mode == "abort") raise(SIGABRT); if(mode == "segfault") raise(SIGSEGV); <>
These actions intentionally trigger failures so you can verify that UCE returns a usable `500` response instead of dropping the upstream connection.
> }