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

Commit 03e52a8

Browse files
committed
must throw exception when Feature exists already
1 parent 1864a97 commit 03e52a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Generators/FeatureGenerator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Lucid\Console\Generators;
1313

14+
use Exception;
1415
use Lucid\Console\Str;
1516
use Lucid\Console\Components\Feature;
1617

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

2930
if ($this->exists($path)) {
30-
$this->error('Feature already exists!');
31+
throw new Exception('Feature already exists!');
3132

3233
return false;
3334
}

0 commit comments

Comments
 (0)