From 21ef635b2cc6eae028f8c24524d12a3d7b5682d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20E=C5=A1ler?= Date: Tue, 20 Nov 2018 16:26:40 +0100 Subject: [PATCH] main class can catch Throwable, fix it in the main Exception --- src/ServiceContainer/Exception.php | 2 +- src/ServiceContainer/ServiceNotFoundException.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ServiceContainer/Exception.php b/src/ServiceContainer/Exception.php index a002831..b1fc104 100644 --- a/src/ServiceContainer/Exception.php +++ b/src/ServiceContainer/Exception.php @@ -7,7 +7,7 @@ class Exception extends \Exception implements ContainerExceptionInterface { - public function __construct(string $message = null, \Exception $previous = null) { + public function __construct(string $message = null, \Throwable $previous = null) { parent::__construct($message, 0, $previous); } diff --git a/src/ServiceContainer/ServiceNotFoundException.php b/src/ServiceContainer/ServiceNotFoundException.php index 015ce6d..1adbe88 100644 --- a/src/ServiceContainer/ServiceNotFoundException.php +++ b/src/ServiceContainer/ServiceNotFoundException.php @@ -6,7 +6,7 @@ class ServiceNotFoundException extends Exception implements NotFoundExceptionInterface { - public function __construct(string $id, \Exception $previous = null) + public function __construct(string $id, \Throwable $previous = null) { parent::__construct('Service object not found, id: ' . $id, $previous); }