当我在侦听器函数中抛出错误时;
socket = require('socket.io-client').connect 'http://localhost:8080'
socket.on 'an-event', ->
throw new Error 'An error has occured' # this is never shown!
console.log 'hello?' # this is never logged!
process.exit 1 # this is never called!
套接字重新连接,并且永远不会显示错误。相反,engine.io Tranport 类会引发“解析器解码错误”。
这样我就无法开发/调试侦听器函数中的逻辑。有解决方案/解决方法吗?