I’m working on the XSLT plugin and like to show a generic error page when an error is thrown during template parsing. If I remember correctly, Kirby 3 displayed a simple :( during development but is there a generic Kirby “something is wrong” error page that can be called from a plugin?
You can set the fatal option in your config. It should be a callback function that returns the html for the generic error page. Unfortunately that option cannot be set via plugin yet, which is not perfect I guess.
return [
'fatal' => function () {
return 'Uh, that sucks';
}
];
If there was no setting for the fatal error page in the config, what would Kirby display? Is there a default fatal error page?
Alright, I just found /kirby/views/fatal.php.