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

@@ -28,7 +28,7 @@ class AddEmpty extends Component
'team_id' => currentTeam()->id,
]);
return redirect()->route('project.show', $project->uuid);
} catch (\Exception $e) {
} catch (\Throwable $e) {
general_error_handler($e, $this);
} finally {
$this->name = '';

View File

@@ -31,7 +31,7 @@ class AddEnvironment extends Component
'project_uuid' => $this->project->uuid,
'environment_name' => $environment->name,
]);
} catch (\Exception $e) {
} catch (\Throwable $e) {
general_error_handler($e, $this);
} finally {
$this->name = '';

View File

@@ -161,7 +161,7 @@ class General extends Component
}
$this->application->save();
$this->emit('success', 'Application settings updated!');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -51,7 +51,7 @@ class BackupEdit extends Component
$this->backup->save();
$this->backup->refresh();
$this->emit('success', 'Backup updated successfully');
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->emit('error', $e->getMessage());
}
}
@@ -76,7 +76,7 @@ class BackupEdit extends Component
$this->backup->save();
$this->backup->refresh();
$this->emit('success', 'Backup updated successfully');
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->emit('error', $e->getMessage());
}
}

View File

@@ -42,7 +42,7 @@ class CreateScheduledBackup extends Component
'team_id' => currentTeam()->id,
]);
$this->emit('refreshScheduledBackups');
} catch (\Exception $e) {
} catch (\Throwable $e) {
general_error_handler($e, $this);
} finally {
$this->frequency = '';

View File

@@ -19,7 +19,7 @@ class Edit extends Component
try {
$this->project->save();
$this->emit('saved');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler($e, $this);
}
}

View File

@@ -164,7 +164,7 @@ class GithubPrivateRepository extends Component
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
]);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -117,7 +117,7 @@ class GithubPrivateRepositoryDeployKey extends Component
'environment_name' => $environment->name,
'application_uuid' => $application->uuid,
]);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -75,14 +75,14 @@ class PublicGitRepository extends Component
$this->get_git_source();
$this->get_branch();
$this->selected_branch = $this->git_branch;
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
if (!$this->branch_found && $this->git_branch == 'main') {
try {
$this->git_branch = 'master';
$this->get_branch();
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}
@@ -161,7 +161,7 @@ class PublicGitRepository extends Component
'environment_name' => $environment->name,
'application_uuid' => $application->uuid,
]);
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -40,7 +40,7 @@ class Select extends Component
// try {
// instantCommand("psql {$this->existingPostgresqlUrl} -c 'SELECT 1'");
// $this->emit('success', 'Successfully connected to the database.');
// } catch (\Exception $e) {
// } catch (\Throwable $e) {
// return general_error_handler($e, $this);
// }
// }

View File

@@ -108,7 +108,7 @@ class All extends Component
$environment->save();
$this->refreshEnvs();
$this->emit('success', 'Environment variable added successfully.');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -53,7 +53,7 @@ class ResourceLimits extends Component
$this->validate();
$this->resource->save();
$this->emit('success', 'Resource limits updated successfully.');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}

View File

@@ -28,7 +28,7 @@ class All extends Component
$this->resource->refresh();
$this->emit('success', 'Storage added successfully');
$this->emit('clearAddStorage');
} catch (\Exception $e) {
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
}