Be descriptive if module folder doesn't match expected

This commit is contained in:
Belle Aerni committed 2022-11-15 21:18:08 -08:00
1 parent 07f61a0d6d
commit 4acee5089c
1 file changed
+6 -1
+6 -1
View File
@@ -301,6 +301,11 @@ class Box_Mod
private function _getModPath()
{
return BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
$modPath = BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
if(is_dir($modPath)){
return $modPath;
}else{
throw new Box_Exception("Error: module $this->mod path appears to be invalid. Please ensure the module folder is named " . ucfirst($this->mod));
}
}
}