Adjust exception text when namespace is incorrect in modules

This commit is contained in:
Austen McDonald
2016-08-24 10:16:42 +00:00
parent 135dd22939
commit f190b61811
+4 -2
View File
@@ -180,8 +180,10 @@ class LibraryConfiguration
if (is_null($entityNamespace) === false) {
$entityDirectory = $this->composerManager->translateNamespaceToPath($entityNamespace);
if (is_dir($entityDirectory) === false) {
throw new \Exception("{$entityDirectory}, generated from {$entityNamespace}, is not a valid directory.");
if ($entityDirectory === null) {
throw new \Exception("Could not translate namespace {$entityNamespace} into a directory.");
} else if (is_dir($entityDirectory) === false) {
throw new \Exception("Path {$entityDirectory}, translated from namespace {$entityNamespace}, is not a valid directory.");
}
$this->entityDirectory = $entityDirectory;