diff --git a/start.php b/start.php index 653b428f..8c6f8329 100644 --- a/start.php +++ b/start.php @@ -20,9 +20,7 @@ require CORE_PATH . 'Loader.php'; Loader::register(); // 注册错误和异常处理机制 -register_shutdown_function('think\Error::appShutdown'); -set_error_handler('think\Error::appError'); -set_exception_handler('think\Error::appException'); +Error::register(); // 加载模式定义文件 $mode = require MODE_PATH . APP_MODE . EXT; @@ -50,4 +48,4 @@ if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) { // 是否自动运行 if (APP_AUTO_RUN) { App::run(); -} \ No newline at end of file +}