Skip to content

Commit

Permalink
Merge pull request #44 from Tofandel/patch-3
Browse files Browse the repository at this point in the history
Let artisan handle exception in transformer
  • Loading branch information
rubenvanassche authored May 3, 2024
2 parents 0548175 + 6634b12 commit 4c85ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Commands/TypeScriptTransformCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public function handle(

try {
$this->ensureConfiguredCorrectly();

$collection = $transformer->transform();
} catch (Exception $exception) {
$this->error($exception->getMessage());

return 1;
}

$collection = $transformer->transform();

$this->table(
['PHP class', 'TypeScript entity'],
collect($collection)->map(fn (TransformedType $type, string $class) => [
Expand Down

0 comments on commit 4c85ea5

Please sign in to comment.