From 622095ebc4f1d84db83c30841088b9f325b4d9de Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 28 May 2024 15:11:25 +0200 Subject: [PATCH] fix: throw exception --- app/Actions/Server/UpdateCoolify.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Actions/Server/UpdateCoolify.php b/app/Actions/Server/UpdateCoolify.php index 2cdc7ea2c..04bfbac06 100644 --- a/app/Actions/Server/UpdateCoolify.php +++ b/app/Actions/Server/UpdateCoolify.php @@ -28,15 +28,15 @@ public function handle() $this->currentVersion = config('version'); if (!$settings->is_auto_update_enabled) { Log::info('Auto update is disabled'); - throw 'Auto update is disabled'; + throw new \Exception('Auto update is disabled'); } if ($this->latestVersion === $this->currentVersion) { Log::info('Already on latest version'); - throw 'Already on latest version'; + throw new \Exception('Already on latest version'); } if (version_compare($this->latestVersion, $this->currentVersion, '<')) { Log::info('Latest version is lower than current version?!'); - throw 'Latest version is lower than current version?!'; + throw new \Exception('Latest version is lower than current version?!'); } Log::info("Updating from {$this->currentVersion} -> {$this->latestVersion}"); $this->update();