syokuhou/public/index.php
2024-11-14 01:22:18 +00:00

21 lines
395 B
PHP

<?php
namespace Syokuhou;
require_once __DIR__ . '/../syokuhou.php';
set_exception_handler(function(\Throwable $ex) {
\Sentry\captureException($ex);
ob_clean();
http_response_code(500);
header('Content-Type: text/plain; charset=utf-8');
if(SKH_DEBUG)
echo (string)$ex;
else
echo 'Internal Server Error';
exit;
});
$ctx->getRouter()->dispatch();