Introduce ClassNotFoundException for container

This commit is contained in:
Tim
2023-08-08 16:56:55 +02:00
parent a854480ff1
commit 7c13318b9a
2 changed files with 17 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class GenericContainer implements ContainerInterface
$className = $this->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'];