Skip to content

Commit e1ebcc4

Browse files
Ignore code that cannot be tested (and only exists to handle an edge case) from code coverage
1 parent b9325a5 commit e1ebcc4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Event/Dispatcher/DirectDispatcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ public function dispatch(Event $event): void
8686
foreach ($this->tracers as $tracer) {
8787
try {
8888
$tracer->trace($event);
89+
// @codeCoverageIgnoreStart
8990
} catch (Throwable $t) {
9091
$this->handleThrowable($t);
9192
}
93+
// @codeCoverageIgnoreEnd
9294
}
9395

9496
if (!array_key_exists($eventClassName, $this->subscribers)) {
@@ -122,7 +124,9 @@ public function handleThrowable(Throwable $t): void
122124
return;
123125
}
124126

127+
// @codeCoverageIgnoreStart
125128
throw $t;
129+
// @codeCoverageIgnoreEnd
126130
}
127131

128132
private function isThrowableFromThirdPartySubscriber(Throwable $t): bool

0 commit comments

Comments
 (0)