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

Fix only general error message is shown when launch.json is invalid #1285

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

ADIX7
Copy link
Contributor

@ADIX7 ADIX7 commented Jul 19, 2024

When launch.json has invalid encoding/bom launch.json can not be parsed, but it seems that assert does not catches it, so there is a general error message about can not parsing the json, instead of the message that there is some kind of problem with launch.json

To reproduce (tested on Linux):

:set ff=unix
:set bomb

This PR fixes this behaviour. Currently it also shows the whole launch.json, so the <feff> is very telling. If it is too much I can revert to the original message. Maybe extending it with a hint that BOM might be the source of the error.

Copy link
Owner

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

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

Thanks for the PR

lua/dap/ext/vscode.lua Outdated Show resolved Hide resolved
lua/dap/ext/vscode.lua Outdated Show resolved Hide resolved
@mfussenegger mfussenegger merged commit 0e889b8 into mfussenegger:master Aug 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants