Ensure that the directory doesn't already exist
This commit is contained in:
parent
d17c1defcf
commit
0ece90c6cf
7 changed files with 217 additions and 4 deletions
11
src/Exception/CannotCreateModuleException.php
Normal file
11
src/Exception/CannotCreateModuleException.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Opdavies\DrupalModuleGenerator\Exception;
|
||||
|
||||
class CannotCreateModuleException extends \RuntimeException
|
||||
{
|
||||
public static function directoryAlreadyExists()
|
||||
{
|
||||
return new static('The given directory name for the module already exists.');
|
||||
}
|
||||
}
|
||||
Reference in a new issue