Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
tty: emit "error" instead of throwing when getWindowSize() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed May 1, 2012
1 parent 6cacb9a commit f4403f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tty.js
Expand Up @@ -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'));

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis May 1, 2012

Member

This is wrong, it doesn't return.

This comment has been minimized.

Copy link
@isaacs

isaacs May 1, 2012

Ah, yes, it should return after emitting error.

}
var newCols = winSize[0];
var newRows = winSize[1];
Expand Down

0 comments on commit f4403f9

Please sign in to comment.