clarifying the exception message

This commit is contained in:
ShockedPlot7560 2023-10-27 21:39:18 +02:00
parent ed739cff4f
commit 7e87fbbb7a
No known key found for this signature in database
GPG Key ID: D7539B420F1FA86E

View File

@ -52,7 +52,7 @@ abstract class Event{
throw new \RuntimeException("Recursive event call detected (reached max depth of " . self::MAX_EVENT_CALL_DEPTH . " calls)");
}
if($this instanceof AsyncEvent){
throw new \InvalidArgumentException("Cannot call async event synchronously");
throw new \InvalidArgumentException("Cannot call async event synchronously, use callAsync() instead");
}
$timings = Timings::getEventTimings($this);