MINOR Throwing exception when path is not found

This commit is contained in:
Ingo Schommer 2010-09-03 01:37:51 +00:00
parent 3c3e57fec3
commit e6a88699ce

View File

@ -249,6 +249,7 @@ class DocumentationService {
* @param bool $major is this a major release * @param bool $major is this a major release
*/ */
public static function register($module, $path, $version = '', $title = false, $major = false) { public static function register($module, $path, $version = '', $title = false, $major = false) {
if(!file_exists($path)) throw new InvalidArgumentException(sprintf('Path "%s" doesn\'t exist', $path));
// add the module to the registered array // add the module to the registered array
if(!isset(self::$registered_modules[$module])) { if(!isset(self::$registered_modules[$module])) {