From f4403f90f846f401cf93ba17cbb6f5ddde8fb03d Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 30 Apr 2012 18:51:20 -0700 Subject: [PATCH] tty: emit "error" instead of throwing when getWindowSize() fails --- lib/tty.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tty.js b/lib/tty.js index 72dd88d2bf..2d66abc407 100644 --- a/lib/tty.js +++ b/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];