Skip to content
Snippets Groups Projects
Unverified Commit a6b26694 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Improved exception messages

parent 99b3e95a
No related branches found
No related tags found
No related merge requests found
......@@ -422,6 +422,12 @@ class Module
if (!class_exists($className)) {
throw new \Exception("Could not resolve '$id': no class named '$className'.");
}
} elseif (!in_array($tmp[0], self::getModules())) {
// Module not installed
throw new \Exception('No module named \'' . $tmp[0]. '\' has been installed.');
} elseif (!self::isModuleEnabled($tmp[0])) {
// Module installed, but not enabled
throw new \Exception('The module \'' . $tmp[0]. '\' is not enabled.');
} else {
// should be a module
// make sure empty types are handled correctly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment