This commit is contained in:
Shish
2023-01-11 11:15:26 +00:00
parent 91b354f6f8
commit 5a64e8729b
49 changed files with 99 additions and 112 deletions

View File

@@ -9,6 +9,9 @@ namespace Shimmie2;
* be included right at the very start of index.php and tests/bootstrap.php
*/
use JetBrains\PhpStorm\NoReturn;
#[NoReturn]
function die_nicely($title, $body, $code=0)
{
print("<!DOCTYPE html>
@@ -48,7 +51,7 @@ set_error_handler(function ($errNo, $errStr) {
// Should we turn ALL notices into errors? PHP allows a lot of
// terrible things to happen by default...
if (str_starts_with($errStr, 'Use of undefined constant ')) {
throw new Exception("PHP Error#$errNo: $errStr");
throw new \Exception("PHP Error#$errNo: $errStr");
} else {
return false;
}