From d07b257c793f4af0bf07fbd4b7cc8f1e26ab57cd Mon Sep 17 00:00:00 2001 From: Adrien Foulon <6115458+Tofandel@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:36:14 +0100 Subject: [PATCH] Let artisan handle the exceptions --- src/Commands/TypeScriptTransformCommand.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Commands/TypeScriptTransformCommand.php b/src/Commands/TypeScriptTransformCommand.php index b385727..ad94a0f 100644 --- a/src/Commands/TypeScriptTransformCommand.php +++ b/src/Commands/TypeScriptTransformCommand.php @@ -41,15 +41,9 @@ public function handle( $transformer = new TypeScriptTransformer($config); - try { - $this->ensureConfiguredCorrectly(); + $this->ensureConfiguredCorrectly(); - $collection = $transformer->transform(); - } catch (Exception $exception) { - $this->error($exception->getMessage()); - - return 1; - } + $collection = $transformer->transform(); $this->table( ['PHP class', 'TypeScript entity'],