From ada74df1ba5e365474700ab9455d67f4c92ab3a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Jun 2021 10:16:30 +0200 Subject: [PATCH] Make error message in AbstractEventListener more useful --- .../system/event/listener/AbstractEventListener.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/event/listener/AbstractEventListener.class.php b/wcfsetup/install/files/lib/system/event/listener/AbstractEventListener.class.php index cfba45d3ad..3b1f134509 100644 --- a/wcfsetup/install/files/lib/system/event/listener/AbstractEventListener.class.php +++ b/wcfsetup/install/files/lib/system/event/listener/AbstractEventListener.class.php @@ -58,7 +58,11 @@ abstract class AbstractEventListener implements IParameterizedEventListener if (\method_exists($this, $methodName)) { $this->{$methodName}($eventObj, $parameters); } else { - throw new \LogicException("Event listener does not handle '{$eventName}' event."); + throw new \LogicException(\sprintf( + "Event listener '%s' does not handle '%s' event.", + static::class, + $eventName + )); } } } -- 2.20.1