/** * 顶层异常处理方法 */ public static function getTopException($e) { self::$unCatchException = $e; //触发异常发生时钩子函数 CHooks::callHooks(HOOKS_EXCEPTION_HAPPEN, $e); //将异常转成错误 $code = $e->getCode(); $message = $e->getMessage(); $file = $e->getFile(); $line = $e->getLine(); $name = get_class($e); trigger_error('未被捕获的异常[' . $name . ']:' . $message . ' - File:' . self::filterFileTruePath($file) . ' - Line:' . $line, E_USER_ERROR); }