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

Better parsing errors for version files #2939

Merged
merged 1 commit into from
Dec 7, 2019

Conversation

HebaruSan
Copy link
Member

Motivation

If a module has a syntax error in its version file, the error in netkan looks like this:

2074 [1] FATAL CKAN.NetKAN.Program (null) - After parsing a value an unexpected character was encountered: ". Path 'KSP_VERSION_MAX', line 37, position 4.

It requires some guessing and/or experience to figure out that this is talking about trying to parse the version file.

Changes

Now we catch that exception and throw a new more descriptive Kraken that explains that it was parsing a version file and gives its path:

2046 [1] FATAL CKAN.NetKAN.Program (null) - Error parsing version file GameData/Severedsolo/OhScrap/OhScrap.version: After parsing a value an unexpected character was encountered: ". Path 'KSP_VERSION_MAX', line 37, position 4.

This should help netkan users to investigate errors, and makes it easier to tell different parsing errors apart.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Pull request Netkan Issues affecting the netkan data labels Dec 7, 2019
@HebaruSan HebaruSan requested a review from DasSkelett December 7, 2019 16:06
HebaruSan added a commit that referenced this pull request Dec 7, 2019
@HebaruSan HebaruSan merged commit 06aaa21 into KSP-CKAN:master Dec 7, 2019
@HebaruSan HebaruSan deleted the better-version-parse-error branch December 7, 2019 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants