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

Proper error messages + other polish #38

Merged
merged 22 commits into from
Feb 3, 2022
Merged

Proper error messages + other polish #38

merged 22 commits into from
Feb 3, 2022

Conversation

JimmyCushnie
Copy link
Owner

@JimmyCushnie JimmyCushnie commented Feb 3, 2022

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.
    • For example, this error would be thrown if a file contains a top-level data line without a : to separate the key and value.
  • CannotRetrieveDataFromNodeException is thrown when SUCC fails to interpret some text as the desired type.
    • For example, this error would be thrown if the user tried to interpret the text 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.

@JimmyCushnie JimmyCushnie merged commit be73c26 into master Feb 3, 2022
@JimmyCushnie JimmyCushnie deleted the cool-upgrades branch February 3, 2022 01:01
@JimmyCushnie JimmyCushnie mentioned this pull request Feb 3, 2022
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.

None yet

1 participant