-
Notifications
You must be signed in to change notification settings - Fork 15
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
Proper error messages + other polish #38
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y for deeply nested errors
… for invalid file structure
…rs are thrown now
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, SUCC finally has helpful errors! There are two kinds:
InvalidFileStructureException
is thrown when SUCC fails to load some text data into a SUCC data tree because the text is formatted incorrectly.:
to separate the key and value.CannotRetrieveDataFromNodeException
is thrown when SUCC fails to interpret some text as the desired type.hello
as an integer.Both error types provide the path to the file with the error and the line number on which the error occurred, making it easy to track down problems. There is extensive test coverage to make sure the proper errors are thrown when they should be.
And thus, #9 is finally closed. I believe this is a new personal record for longest time between opening an issue and closing it. Almost three years -- over half the total time I've been a programmer!
This PR also includes various miscellaneous refactoring and code cleanup, as I continue to polish up the work of a younger, dumber me. Most notably, the code for handling collection types has been significantly improved in preparation for #35.