X Tutup
The Wayback Machine - https://web.archive.org/web/20220323092619/https://github.com/nodejs/node/pull/38209
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: fix error message printing #38209

Closed
wants to merge 2 commits into from
Closed

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Apr 12, 2021

The REPL implementation would strip away the first and last character
of a formatted error message if it ended with ] (but with the
obviously missing check for a starting ]), leading to things like
Uncaught rror: foo[a being printed for input like Error: foo[a].

Refs: #22436

The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.

Refs: nodejs#22436
@addaleax addaleax added repl lts-watch-v12.x lts-watch-v14.x labels Apr 12, 2021
@nodejs-github-bot nodejs-github-bot added the needs-ci label Apr 12, 2021
aduh95
aduh95 approved these changes Apr 12, 2021
test/parallel/test-repl-pretty-stack-custom-writer.js Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Trott
Trott approved these changes Apr 12, 2021
ZYSzys
ZYSzys approved these changes Apr 12, 2021
@addaleax addaleax added author ready and removed needs-ci labels Apr 12, 2021
@nodejs-github-bot

This comment has been hidden.

lpinca
lpinca approved these changes Apr 12, 2021
@nodejs-github-bot

This comment has been hidden.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 13, 2021

@jasnell jasnell added the fast-track label Apr 13, 2021
@jasnell
Copy link
Member

@jasnell jasnell commented Apr 13, 2021

CI is green and this has plenty of approvals. There's no reason for it to wait the full 48 hours to land. Please 👍🏻 to fast-track

@jasnell
Copy link
Member

@jasnell jasnell commented Apr 13, 2021

Landed in e739196

@jasnell jasnell closed this Apr 13, 2021
jasnell added a commit that referenced this issue Apr 13, 2021
The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.

Refs: #22436

PR-URL: #38209
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@addaleax addaleax deleted the repl-err-printing branch Apr 13, 2021
BethGriggs added a commit that referenced this issue Apr 15, 2021
The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.

Refs: #22436

PR-URL: #38209
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams added a commit that referenced this issue Apr 29, 2021
The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.

Refs: #22436

PR-URL: #38209
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
@targos targos removed the lts-watch-v14.x label Sep 4, 2021
@richardlau richardlau removed the lts-watch-v12.x label Dec 14, 2021
@richardlau richardlau added the backported-to-v12.x label Dec 14, 2021
richardlau added a commit that referenced this issue Dec 14, 2021
The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.

Refs: #22436

PR-URL: #38209
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@richardlau richardlau mentioned this pull request Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready backported-to-v12.x fast-track repl
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

X Tutup