fix: errors

This commit is contained in:
Andras Bacsai
2023-09-11 17:36:30 +02:00
parent 16c71f3647
commit 64a65e2018
67 changed files with 156 additions and 147 deletions

View File

@@ -66,7 +66,7 @@ class Form extends Component
} else {
$this->emit('error', 'Old (lower than 23) or no Docker version detected. Install Docker Engine on the General tab.');
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler($e, that: $this);
}
}
@@ -81,7 +81,7 @@ class Form extends Component
}
$this->server->delete();
return redirect()->route('server.all');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -78,7 +78,7 @@ class ByIp extends Component
$server->settings->is_part_of_swarm = $this->is_part_of_swarm;
$server->settings->save();
return redirect()->route('server.show', $server->uuid);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e);
}
}

View File

@@ -55,7 +55,7 @@ class Proxy extends Component
setup_default_redirect_404(redirect_url: $this->server->proxy->redirect_url, server: $this->server);
$this->emit('success', 'Proxy configuration saved.');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e);
}
}
@@ -64,7 +64,7 @@ class Proxy extends Component
{
try {
$this->proxy_settings = resolve(CheckConfigurationSync::class)($this->server, true);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e);
}
}
@@ -73,7 +73,7 @@ class Proxy extends Component
{
try {
$this->proxy_settings = resolve(CheckConfigurationSync::class)($this->server);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e);
}
}

View File

@@ -21,7 +21,7 @@ class ShowPrivateKey extends Component
$this->server->refresh();
refresh_server_connection($this->server->privateKey);
$this->checkConnection();
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->server->update([
'private_key_id' => $oldPrivateKeyId
]);
@@ -46,7 +46,7 @@ class ShowPrivateKey extends Component
} else {
$this->emit('error', 'Old (lower than 23) or no Docker version detected. Install Docker Engine on the General tab.');
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new \Exception($e->getMessage());
}
}