nodejs express错误处理中间件

app.get('/a',function(req,res,next){ res.end('hahah'); next(new Error('错误啦')); }); app.use('/a',function(err,req,res,next){ console.log('路由错误'+err); }) //all error中间件 app.use(function(err, req,
相关文章
相关标签/搜索