The default error handler --- catches exceptions and displays them with full context and fix suggestions.
composer require marko/errors-simpleuse Marko\Core\Exceptions\MarkoException;
// Throw rich exceptions --- the handler displays context and fix suggestions automatically
throw new MarkoException(
message: 'Configuration invalid',
context: 'Loading payment gateway settings',
suggestion: 'Check that API_KEY is set in your .env file',
);Full usage, API reference, and examples: marko/errors-simple