Refactor exception handler to v3, use standard shell exitcode

This commit is contained in:
crazywhalecc
2026-02-15 21:58:42 +08:00
committed by Jerry Ma
parent ee5aabbe34
commit bbab685247
17 changed files with 400 additions and 211 deletions

View File

@@ -21,10 +21,8 @@ if (PHP_VERSION_ID < 80400) {
try {
(new ConsoleApplication())->run();
} catch (SPCException $e) {
ExceptionHandler::handleSPCException($e);
exit(1);
exit(ExceptionHandler::handleSPCException($e));
} catch (\Throwable $e) {
ExceptionHandler::handleDefaultException($e);
exit(1);
exit(ExceptionHandler::handleDefaultException($e));
}