Hello,
When I use throw new Exception()
in a hook, Kirby displays a pop-up with the message “Please fix all form errors…”
I can reproduce this issue in the starterkit (Kirby 3.2.5) by adding this in the config file:
return [
'debug' => true,
'hooks' => [
'page.update:after' => function ( $newPage , $oldPage ) {
throw new Exception('Page Updated');
}
]
];