fix: Fange alle Fehler mit Throwable ab und verallgemeinere Meldung
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
fc5b4d5c8a
commit
64f2d752e5
1 changed files with 4 additions and 4 deletions
|
|
@ -69,8 +69,8 @@ if ($uri === '/' || $uri === '/index.php') {
|
|||
echo "<p>Keine gespielten Spiele gefunden.</p>";
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo "<p style='color:red;'>Datenbankfehler: " . $e->getMessage() . "</p>";
|
||||
} catch (Throwable $e) {
|
||||
echo "<p style='color:red;'>Fehler: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
} elseif ($uri === '/api/status') {
|
||||
header('Content-Type: application/json');
|
||||
|
|
@ -90,9 +90,9 @@ if ($uri === '/' || $uri === '/index.php') {
|
|||
|
||||
// Lade das View-Template für die Rundenansicht
|
||||
require __DIR__ . '/../src/Views/round.php';
|
||||
} catch (Exception $e) {
|
||||
} catch (Throwable $e) {
|
||||
http_response_code(500);
|
||||
echo "<p style='color:red;'>Datenbankfehler: " . htmlspecialchars($e->getMessage()) . "</p>";
|
||||
echo "<p style='color:red;'>Fehler: " . htmlspecialchars($e->getMessage()) . "</p>";
|
||||
}
|
||||
} else {
|
||||
http_response_code(404);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue