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

repl: always show all error properties #20801

Closed
wants to merge 1 commit into from

Conversation

BridgeAR
Copy link
Member

Currently errors only show the error stack. This changes it to
inspect the full error instead of just using the stack.

Refs: #20253

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Currently errors only show the error stack. This changes it to
inspect the full error instead of just using the stack.
@nodejs-github-bot nodejs-github-bot added the repl Issues and PRs related to the REPL subsystem. label May 17, 2018
@BridgeAR
Copy link
Member Author

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Need to determine if this is semver-major because of the change to console output.

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 17, 2018
@BridgeAR
Copy link
Member Author

I personally think this is a semver-patch. @nodejs/tsc PTAL

const timeout = setTimeout(() => {
reject(
new Error(`Repl did not reply as expected for:\n\n${inspect(expected)}`)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is expected always an event name (a string?).
If it is I think padding with two newlines is a bit much. It could just go right after the : .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, expected is the expected output, so either a string or an array with many strings.

}, 500);
ee.once('data', common.mustCall((...args) => {
clearTimeout(timeout);
resolve(...args);
Copy link
Member

@jdalton jdalton May 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With promises I believe once resolve is called a reject will have no effect so it could go without clearing since the timeout has no other side effects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it would keep the test alive after being done if I am not mistaken.

@BridgeAR
Copy link
Member Author

BridgeAR commented May 20, 2018

Landed in e270ae9

Update: Closed by mistake.

@BridgeAR BridgeAR closed this May 20, 2018
@BridgeAR BridgeAR deleted the repl-show-full-error branch January 20, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants