Browse Source

Revert "Closes GH-85 Emit error rather than throwing."

This reverts commit f3d364122d.

Landed in master instead.
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
fbe36a7ca9
  1. 3
      lib/fs.js
  2. 3
      lib/tty_win32.js

3
lib/fs.js

@ -1027,8 +1027,7 @@ WriteStream.prototype.flush = function() {
WriteStream.prototype.write = function(data) {
if (!this.writable) {
this.emit("error", new Error('stream not writable'));
return false;
throw new Error('stream not writable');
}
this.drainable = true;

3
lib/tty_win32.js

@ -99,8 +99,7 @@ WriteStream.prototype.isTTY = true;
WriteStream.prototype.write = function(data, encoding) {
if (!this.writable) {
this.emit("error", new Error('stream not writable'));
return false;
throw new Error('stream not writable');
}
if (Buffer.isBuffer(data)) {

Loading…
Cancel
Save