diff --git a/src/Command/Command.php b/src/Command/Command.php index 3cbbf83..9bd51a2 100644 --- a/src/Command/Command.php +++ b/src/Command/Command.php @@ -2,6 +2,7 @@ namespace OriginEngine\Command; +use Illuminate\Support\Facades\Event; use OriginEngine\Contracts\Feature\FeatureRepository; use OriginEngine\Contracts\Feature\FeatureResolver; use OriginEngine\Contracts\Pipeline\PipelineRunner; @@ -84,6 +85,10 @@ public function getSubscribedSignals(): array public function handleSignal(int $signal): void { event(new SignalReceived($signal)); + + if(!Event::hasListeners(SignalReceived::class)) { + throw new \Exception(sprintf('Signal %u encountered, stopping.', $signal)); + } } }