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.
The most important change here is that I have made the GMX reader finally more fault tolerant than the GMK file reader. No longer do I just lob all exceptions up and exit as early as possible, I attempt to handle errors as they occur. For example, if the subframe image for some sprite can't be read, an error dialog will be displayed but the file reader will continue reading other resources. So the user is still informed of the error but it doesn't stop you from loading the whole project.
Also if the XML parser fails to parse a resource's XML file, you will still get the resource added to the tree, but none of its data is loaded.
I also used the DefaultPostponedRef class in a few places to reduce the code bloat since they were all doing the same thing anyway. That was the purpose of that class.
I also fixed an issue where the default exception handler was printing the thread name after the exception stack trace. The thread name should have been printed to the error stream not the standard output stream.