Skip to content

Commit a875db7

Browse files
fprochazkanicolas-grekas
authored andcommitted
Catch \Throwable
1 parent 1b56544 commit a875db7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Container.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
320320
return;
321321
}
322322

323+
throw $e;
324+
} catch (\Throwable $e) {
325+
unset($this->loading[$id]);
326+
unset($this->services[$id]);
327+
323328
throw $e;
324329
}
325330

ContainerBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV
461461
return;
462462
}
463463

464+
throw $e;
465+
} catch (\Throwable $e) {
466+
unset($this->loading[$id]);
467+
464468
throw $e;
465469
}
466470

0 commit comments

Comments
 (0)