Skip to content

Commit 0548175

Browse files
Merge pull request #42 from spatie/revert-41-patch-1
Revert "Let artisan handle the exceptions"
2 parents 65927d4 + 6f83188 commit 0548175

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Commands/TypeScriptTransformCommand.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ public function handle(
4141

4242
$transformer = new TypeScriptTransformer($config);
4343

44-
$this->ensureConfiguredCorrectly();
44+
try {
45+
$this->ensureConfiguredCorrectly();
4546

46-
$collection = $transformer->transform();
47+
$collection = $transformer->transform();
48+
} catch (Exception $exception) {
49+
$this->error($exception->getMessage());
50+
51+
return 1;
52+
}
4753

4854
$this->table(
4955
['PHP class', 'TypeScript entity'],

0 commit comments

Comments
 (0)