首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >error handling in Nodejs

error handling in Nodejs

作者头像
Jerry Wang
发布2019-09-16 14:36:58
5900
发布2019-09-16 14:36:58
举报

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://jerry.blog.csdn.net/article/details/100824531

If I simply throw the exception:

app.get('/error', (request, response) => {  
  throw new Error('Jerry oops')
});

Then:

Error: Jerry oops at app.get (C:\Code\git\practice\nodejs\index.js:55:9) at Layer.handle [as handle_request] (C:\Code\git\practice\nodejs\node_modules\express\lib\router\layer.js:95:5) at next (C:\Code\git\practice\nodejs\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Code\git\practice\nodejs\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Code\git\practice\nodejs\node_modules\express\lib\router\layer.js:95:5) at C:\Code\git\practice\nodejs\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Code\git\practice\nodejs\node_modules\express\lib\router\index.js:335:12) at next (C:\Code\git\practice\nodejs\node_modules\express\lib\router\index.js:275:10) at app.use (C:\Code\git\practice\nodejs\index.js:45:3) at Layer.handle [as handle_request] (C:\Code\git\practice\nodejs\node_modules\express\lib\router\layer.js:95:5)

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年09月14日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档