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.
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.