-
Notifications
You must be signed in to change notification settings - Fork 56
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
uncaught errors should be printed to stderr, not stdout #196
Comments
It could be argued Mocha should print these to stdout, but that's how it works right now. |
Hmm. Can’t think of a good reason right now. I might have been lazy 😄 |
There is one problem with having two output streams: The output is buffered partially to detect stack traces and map them back to the original source location using sourcemaps. Therefore it could happen that the outputs of the two streams are misleading, because there might be an offset. |
offset meaning incorrect stack trace, or do you mean interleaving? don't understand |
The one stream might be flushed while the other is still buffered. This could mean that you see a stack trace in the wrong place. |
possible to just buffer both? |
Here: https://github.com/mantoni/mochify.js/blob/master/lib/chromium.js#L141
Mochify prints uncaught errors to stdout. It should print these to stderr (which is what Mocha does).
@mantoni Any reason not to do this?
Unclear if the code at https://github.com/mantoni/mochify.js/blob/master/lib/chromium.js#L154 should also do this.
The text was updated successfully, but these errors were encountered: