getError(), 422); //} // 请求异常 //if ($e instanceof HttpException && request()->isAjax()) { // return response($e->getMessage(), $e->getStatusCode()); //} Tools::log_to_write_txt([ 'error'=>'系统错误.'.$e->getMessage(), 'input'=>input(), 'error_info'=>$e->getTraceAsString() ]); //request()->LogObj->flush(); //可以在此交由系统处理 return parent::render($e); } }