{error 'message'} calls padError() - the same function the engine
uses for its own errors - from a template. What happens next is up to
$padErrorAction in _config/config.php:
pad (the default): the request ends with status 500 and the error report -
the message, where in the template it stands, the stack - for a local request; any other
visitor gets the request id, or the application's _errors/500.pad, while the
report is logged.stop and exit: the request ends with status 500, without the
report page.dump: the full dump is written to DATA/dumps/ and the error
logged; the page goes on.log: the error is logged and the page goes on; ignore: the page
goes on and nothing is logged.boot and php: the boot handler, or PHP's own exception
handling, takes over.In every case the application's _events/error.php hook runs first, with
$error, $file and $line. When the request survives,
the tag itself renders nothing: padError() returns FALSE.
Use it to stop on a state a page must never reach - an unknown value in a {case}, a required row that is not there. For a check that only test runs should hold the page to, use {assert}; to end the request quietly, {exit}; to throw a real PHP exception instead, {exception}.