1

我正在使用new --inspect节点中的参数来调试我的应用程序Chrome Developer Tools。我的承诺链末尾有一个非常基本catch的,但返回的错误并没有清楚地显示它们来自哪里。

我能看到错误源自哪个文件吗?

  leagues(app).getLeagues(passData)
    .then(teamsApi.getNorsemenTeams)
      .then(filterBarGamesIndex)
    .then(gamesApi.getNorseGames)
    .then(gamesApi.getFilteredTeams)
    .then(function (passData) {
      res.render('games', {
        title: 'Results',
        passData: passData,
        type: req.originalUrl.split('/')[2]
      })
    })
      .catch(function(err) {
          console.error(err); //Line 35
      });
}

在此处输入图像描述

直接从控制台错误是:

TypeError: Cannot read property 'Intermediate_Division_2' of undefined
    at /var/www/beta.norsemanfc.co.uk/app/controllers/filterBar/fixturesIndex.js:27:62
    at Array.filter (native)
    at module.exports (/var/www/beta.norsemanfc.co.uk/app/controllers/filterBar/fixturesIndex.js:25:42)
    at process._tickCallback (internal/process/next_tick.js:103:7)
4

1 回答 1

3

您可能想要转储有关异常的更多信息,如

控制台日志(错误堆栈);

于 2017-07-15T22:42:17.000 回答