<?php
namespace Satori;
require_once __DIR__ . '/../satori.php';
set_exception_handler(function(\Throwable $ex) {
\Sentry\captureException($ex);
http_response_code(500);
ob_clean();
if(SAT_DEBUG) {
header('Content-Type: text/plain; charset=utf-8');
echo (string)$ex;
exit;
}
header('Content-Type: text/html; charset=utf-8');
echo file_get_contents(SAT_DIR_PUBLIC . '/404.html');
});
$sat->createRouting()->dispatch();