Permalink
Browse files

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

  • Loading branch information...
1 parent 6cacb9a commit f4403f90f846f401cf93ba17cbb6f5ddde8fb03d @TooTallNate committed May 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tty.js
View
2 lib/tty.js
@@ -101,7 +101,7 @@ WriteStream.prototype._refreshSize = function() {
var oldRows = this.rows;
var winSize = this._handle.getWindowSize();
if (!winSize) {
- throw errnoException(errno, 'getWindowSize');
+ this.emit('error', errnoException(errno, 'getWindowSize'));
}
var newCols = winSize[0];
var newRows = winSize[1];

0 comments on commit f4403f9

Please sign in to comment.