Class TemplateFlowSignal

All Implemented Interfaces:
io.karatelabs.js.FlowControlSignal, Serializable

public class TemplateFlowSignal extends RuntimeException implements io.karatelabs.js.FlowControlSignal
Signal thrown by ServerMarkupContext.redirect(String) and ServerMarkupContext.switchTemplate(String) to cleanly abort template rendering or API handler evaluation when a redirect or a template switch is requested.

Treated as control flow (not an error) by the JS engine, the markup engine's error logger, and the server request cycle. The actual redirect/switch behavior is driven by state on ServerMarkupContext (hasRedirect, isSwitched), which remains set when this signal is caught upstream.

See Also: