Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message in "io" module #245

Closed
botic opened this issue Jan 17, 2014 · 0 comments · Fixed by #260
Closed

Misleading error message in "io" module #245

botic opened this issue Jan 17, 2014 · 0 comments · Fixed by #260

Comments

@botic
Copy link
Member

botic commented Jan 17, 2014

If write() is called on a read-only stream, the error message does not indicate this. Instead someone could think the charset is missing or that the encoder had some troubles:

TypeError: Cannot call method "encode" of undefined
    at io.js:485 (anonymous)
    at io.js:494 (anonymous)
    at /Users/philipp/Documents/main.js:49
botic added a commit that referenced this issue Jun 24, 2014
Better error message if writing read-only streams, fixes #245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant