Skip to content

Improve YML parsing error output#389

Merged
pyth0n1c merged 3 commits intomainfrom
give_filename_when_yml_parsing_errors_out
Mar 28, 2025
Merged

Improve YML parsing error output#389
pyth0n1c merged 3 commits intomainfrom
give_filename_when_yml_parsing_errors_out

Conversation

@pyth0n1c
Copy link
Copy Markdown
Contributor

Give the name of the YML file which causes an exception when there is an error parsing a yml file. Right now we do not, which makes debugging and fixing the error needlessly complicated

For example, instead of crashing, we will give the most verbose error we can. For example, this is the result of trying to parse an invalid YML now
image

Unfortunately, we can't give a more detailed error than this, or recommendation of what to fix, but this is typically enough that when the file is opened, especially in an IDE with YML support, it is clear what the issue is.

… an error parsing a yml file. Right now we do not, which makes debugging and fixing the error needlessly complicated
Copy link
Copy Markdown
Contributor Author

@pyth0n1c pyth0n1c left a comment

Choose a reason for hiding this comment

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

I have tested this locally with some badly formatted YMLs.
This looks good to me, as it is a small change I am approving and merging myself.

@pyth0n1c pyth0n1c merged commit 5daee4a into main Mar 28, 2025
16 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.

1 participant