joyent/node — Issue #1960: socket.write (and similar) should throw more meaningful exceptions
Author: Joris-van-der-Wel
Created: 2011-10-28 17:17:50+00:00
State: open

When I have a tcp net.Socket and I do a write() when the connection has been dropped, I get a TypeError (node 0.5.9):
net_uv.js:389
TypeError: Cannot call method 'write' of null
var writeReq = this._handle.write(data);

It would be useful if a more meaningful exception was thrown "net.ConnectionError", etc.