D:\duwei\git\goodStart\www\test.js:10
}else if(req.url==='/favicon.ico'){
^
SyntaxError: Unexpected token }
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
用try catch
只能捕获 SyntaxError: Unexpected token }
及以下的内容. ^
及上面的捕获不到.但终端有输出.
请问怎么捕获到:
D:\duwei\git\goodStart\www\test.js:10
}else if(req.url==='/favicon.ico'){
^