Browse Source

tty: emit "error" instead of throwing when getWindowSize() fails

v0.9.1-release
Nathan Rajlich 13 years ago
parent
commit
f4403f90f8
  1. 2
      lib/tty.js

2
lib/tty.js

@ -101,7 +101,7 @@ WriteStream.prototype._refreshSize = function() {
var oldRows = this.rows; var oldRows = this.rows;
var winSize = this._handle.getWindowSize(); var winSize = this._handle.getWindowSize();
if (!winSize) { if (!winSize) {
throw errnoException(errno, 'getWindowSize'); this.emit('error', errnoException(errno, 'getWindowSize'));
} }
var newCols = winSize[0]; var newCols = winSize[0];
var newRows = winSize[1]; var newRows = winSize[1];

Loading…
Cancel
Save