We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 523c8fc commit fb58cb3Copy full SHA for fb58cb3
library/Icinga/Application/Hook/RequestHook.php
@@ -3,7 +3,9 @@
3
namespace Icinga\Application\Hook;
4
5
use Icinga\Application\Hook;
6
+use Icinga\Application\Logger;
7
use Icinga\Web\Request;
8
+use Throwable;
9
10
abstract class RequestHook extends Hook
11
{
@@ -26,7 +28,11 @@ abstract public function onPostDispatch(Request $request): void;
26
28
final public static function postDispatch(Request $request): void
27
29
30
foreach (static::all('Request') as $hook) {
- $hook->onPostDispatch($request);
31
+ try {
32
+ $hook->onPostDispatch($request);
33
+ } catch (Throwable $e) {
34
+ Logger::error('Failed to execute hook on request: %s', $e);
35
+ }
36
}
37
38
0 commit comments