projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca8be39
)
Revert "Closes GH-85 Emit error rather than throwing."
author
Ryan Dahl
<ry@tinyclouds.org>
Thu, 3 Mar 2011 06:08:44 +0000
(22:08 -0800)
committer
Ryan Dahl
<ry@tinyclouds.org>
Thu, 3 Mar 2011 06:10:16 +0000
(22:10 -0800)
This reverts commit
f3d364122dc12f13cbfb848576a8b152849452ea
.
Landed in master instead.
lib/fs.js
patch
|
blob
|
history
lib/tty_win32.js
patch
|
blob
|
history
diff --git
a/lib/fs.js
b/lib/fs.js
index
0ae4550
..
d07a152
100644
(file)
--- a/
lib/fs.js
+++ b/
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;
diff --git
a/lib/tty_win32.js
b/lib/tty_win32.js
index
7aa137a
..
6ca011a
100644
(file)
--- a/
lib/tty_win32.js
+++ b/
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)) {