Tag: 堆栈跟踪

使用承诺 – 在失败处理程序中logging堆栈跟踪

我对nodejs比较陌生,所以我会更详细地解释一下我正在做的事情。 我有一个networking服务器。 如果请求失败,我想logging该exception的堆栈跟踪,但是传递错误页面而不会使服务器崩溃。 例如,处理请求的函数: var Q = require('q'); var requestHandler = function () { // Here I get the data etc. that was requested. As this is not important, just a dummy here Q.resolve() // Now I answer the request .then(function (data) { // Dummy Code representing the sending of a response console.log('sending response …'); […]

一个node.js堆栈错误超过10行?

有没有办法获得超过10行node.js堆栈错误? function a() { dieInHell(); } function b() { a(); } function c() { b(); } function d() { c(); } function e() { d(); } function f() { e(); } function g() { f(); } function h() { g(); } function i() { h(); } function j() { i(); } function k() { j(); […]