mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
MINOR Throwing exception when path is not found
This commit is contained in:
parent
3c3e57fec3
commit
e6a88699ce
@ -249,6 +249,7 @@ class DocumentationService {
|
||||
* @param bool $major is this a major release
|
||||
*/
|
||||
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
|
||||
if(!isset(self::$registered_modules[$module])) {
|
||||
|
Loading…
Reference in New Issue
Block a user