首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 > Express js error handling?

Express js error handling?

提问于 2018-02-08 07:32:08
回答 2关注 0查看 350

代码:

代码语言:txt
复制
var express = require('express');
var app = express();

app.use(function(err, req, res, next) {
    console.log("error!!!");
    res.send("error!!!");
});

app.get('/', function(request, response) {
    throw "some exception";
    response.send('Hello World!');
});

app.listen(5000, function() {
  console.log("Listening on 5000");
});


error:
 Express js error handling 

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档