From 7c13318b9a1a0dd7fb9cc4ec80889652a372d2f4 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 8 Aug 2023 16:56:55 +0200 Subject: [PATCH] Introduce ClassNotFoundException for container --- src/Container/ClassNotFoundException.php | 16 ++++++++++++++++ src/Container/GenericContainer.php | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/Container/ClassNotFoundException.php diff --git a/src/Container/ClassNotFoundException.php b/src/Container/ClassNotFoundException.php new file mode 100644 index 0000000..e0e6325 --- /dev/null +++ b/src/Container/ClassNotFoundException.php @@ -0,0 +1,16 @@ +aliases[$className]; } if (!isset($this->definitions[$className])) { - throw new Exception("Class $className not found in container"); + throw new ClassNotFoundException($className); } $definition = $this->definitions[$className]['definition'];