我正在将bluebirdjs用于nodejs应用程序。它从源代码中抛出异常。
行:try {throw new Error(); } catch (e) {ret.lastLineError = e;}
路径:bluebird / js / release / util.js
行:374
这个例外对我来说似乎没用。它只会抛出异常。删除这一行是否合理?
第3行的async.js中也存在相同的代码。
答案 0 :(得分:4)
In IE an Error
object will not have a .stack
property unless it goes a through try catch. The .stack
property is needed to see which line and file the code is in.
ret.lastLineError = new Error()
would therefore only work in firefox and chrome