-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
repl: attach location info to syntax errors #4013
Conversation
ArrayStream.prototype.readable = true; | ||
ArrayStream.prototype.writable = true; | ||
ArrayStream.prototype.resume = function() {}; | ||
ArrayStream.prototype.write = function(output) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use common.mustCall
here to make sure that this is called.
I agree with the comments from @targos and @thefourtheye but LGTM apart from that. |
@thefourtheye @targos @bnoordhuis responded to comments. |
Starting a CI run: https://ci.nodejs.org/job/node-test-pull-request/847/ Please let me know if I haven't adequately addressed your comments. UPDATE: The test appears to have some issues on Windows. |
New CI because Windows backslashes + REPL: https://ci.nodejs.org/job/node-test-pull-request/848/ |
This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
I'm going to look into moving EDIT: #4026 |
@cjihrig : should this go into LTS also? |
It can go into LTS, but @bnoordhuis has opened #4026 to make the |
I just landed #4026, FWIW. |
This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: #2762 Refs: #3411 Refs: #3784 PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
This PR will also require #4215 to land on LTS in order to not break the repl. Will wait for it to land and live in a release for a bit before landing these commits in LTS |
This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: #2762 Refs: #3411 Refs: #3784 PR-URL: #4013 Reviewed-By: Ben Noordhuis <[email protected]>
Notable changes: * assert - accommodate ES6 classes that extend Error (Rich Trott) #4166 * build - add "--partly-static" build options (Super Zheng) #4152 * deps - backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655 - backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128 - upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé) * docs - various updates landed in 70 different commits! * repl - attach location info to syntax errors (cjihrig) #4013 - display error message when loading directory (Prince J Wesley) #4170 * tests - various updates landed in over 50 commits * util - allow lookup of hidden values (cjihrig) #3988
Notable changes: * assert - accommodate ES6 classes that extend Error (Rich Trott) #4166 * build - add "--partly-static" build options (Super Zheng) #4152 * deps - backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655 - backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128 - upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé) * docs - various updates landed in 70 different commits! * repl - attach location info to syntax errors (cjihrig) #4013 - display error message when loading directory (Prince J Wesley) #4170 * tests - various updates landed in over 50 commits * util - allow lookup of hidden values (cjihrig) #3988 PR-URL: #4768
Notable changes: * assert - accommodate ES6 classes that extend Error (Rich Trott) #4166 * build - add "--partly-static" build options (Super Zheng) #4152 * deps - backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655 - backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128 - upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé) * docs - various updates landed in 70 different commits! * repl - attach location info to syntax errors (cjihrig) #4013 - display error message when loading directory (Prince J Wesley) #4170 * tests - various updates landed in over 50 commits * util - allow lookup of hidden values (cjihrig) #3988 PR-URL: #4768
This commit adds the decorateErrorStack() method. This function uses the internal util's getHiddenValue() method to extract arrow messages from error objects and attach them to the error's stack trace. PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace. Refs: nodejs#2762 Refs: nodejs#3411 Refs: nodejs#3784 PR-URL: nodejs#4013 Reviewed-By: Ben Noordhuis <[email protected]>
Notable changes: * assert - accommodate ES6 classes that extend Error (Rich Trott) nodejs#4166 * build - add "--partly-static" build options (Super Zheng) nodejs#4152 * deps - backport 066747e from upstream V8 (Ali Ijaz Sheikh) nodejs#4655 - backport 200315c from V8 upstream (Vladimir Kurchatkin) nodejs#4128 - upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé) * docs - various updates landed in 70 different commits! * repl - attach location info to syntax errors (cjihrig) nodejs#4013 - display error message when loading directory (Prince J Wesley) nodejs#4170 * tests - various updates landed in over 50 commits * util - allow lookup of hidden values (cjihrig) nodejs#3988 PR-URL: nodejs#4768
Currently, when a file with a syntax error is imported in the REPL, no information is provided on the error's location. This commit adds the error's location to the stack trace.
Refs #3784