repl: display error message when loading directory#4170
repl: display error message when loading directory#4170princejwesley wants to merge 1 commit intonodejs:masterfrom
Conversation
lib/repl.js
Outdated
There was a problem hiding this comment.
maybe is not a file -> is not a valid file
88ebc6d to
3e03a6a
Compare
|
@JungMinu Updated. |
|
/cc @evanlucas @thefourtheye PTAL :) |
|
Semver-major due to the added throw |
|
LGTM |
|
LGTM |
|
Can you add a regression test to |
|
@bnoordhuis Sure. I'll add and update here |
When loading directory instead of file, no error message
is displayed. Its good to display error message for
this scenario.
Before:
> .load /Users/princejohnwesley/Projects/Playground/Node
>
After:
> .load /Users/princejohnwesley/Projects/Playground/Node
Failed to load:/Users/princejohnwesley/Projects/Playground/Node is not a valid file
>
3e03a6a to
8a6db50
Compare
|
@bnoordhuis Test added |
|
LGTM, thanks. CI: https://ci.nodejs.org/job/node-test-pull-request/975/ |
|
@JungMinu I see you've assigned this to yourself. Feel free to land it when the CI checks out. |
|
CI is happy except for unrelated Windows test :) |
When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: #4170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
|
Thanks, landed in aad6b9f |
|
@jasnell how is this semver-major? |
|
@Fishrock123 ... precautionary based on the new throw. If folks are
|
|
@jasnell Is there a new throw? |
|
Sorry, not new throw... sigh, I'm doing too many things at once. I meant the new output message. While it's not technically a throw, it is a new output indicating that the operation failed. The ctc had decided to treat changes to error messages as semver-major... this one comes across as a grey area to me so to be safe I flagged it. Like I said tho, I'm perfectly fine with removing that if others are -- I may just be being overly conservative on it :-) |
Ah, that makes sense then, thanks for the explanation! =) |
|
I don't think REPL warnings count as error messages. (We've added and changed lots of them with the repl history stuff anyways.) |
|
@Fishrock123 ... ok! works for me then. Removing the flag :-) |
When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: #4170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: #4170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: #4170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
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
When loading directory instead of file, no error message is displayed. It's good to display error message for this scenario. PR-URL: nodejs#4170 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
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
When loading directory instead of file, no error message
is displayed. Its good to display error message for
this scenario.
Before:
After: