Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
must throw exception when Feature exists already
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulkave committed Sep 11, 2016
1 parent 1864a97 commit 03e52a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Generators/FeatureGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Lucid\Console\Generators;

use Exception;
use Lucid\Console\Str;
use Lucid\Console\Components\Feature;

Expand All @@ -27,7 +28,7 @@ public function generate($feature, $service, array $jobs = [])
$path = $this->findFeaturePath($service, $feature);

if ($this->exists($path)) {
$this->error('Feature already exists!');
throw new Exception('Feature already exists!');

return false;
}
Expand Down

0 comments on commit 03e52a8

Please sign in to comment.