Revert "Closes GH-85 Emit error rather than throwing."
This reverts commit f3d364122dc12f13cbfb848576a8b152849452ea. Landed in master instead.
This commit is contained in:
parent
ca8be39b9e
commit
fbe36a7ca9
@ -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;
|
||||
|
@ -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…
x
Reference in New Issue
Block a user