摘要:
1.异常处理 在我们进行代码开发的时候,异常的捕获处理是一个不能忽略的话题,那么怎么才能捕获到node中的异常呢?或许你最先想到的是try/catch的使用,如下例:var http = require('http')var opts = { host: 'sfnsdkfjdsnk.com', port: 80, path: '/'}try { http.get(opts, function(res) { console.log('Will this get called?') })}catch (e) { console.log 阅读全文
posted @ 2012-09-26 17:23
下一站永远
阅读(3609)
评论(10)
推荐(1)

浙公网安备 33010602011771号