Pulsar4xDevs / Pulsar4x

A Fan work recreation of Aurora4x in C#
Other
160 stars 67 forks source link

Json Wishlist & Exception messages. #278

Open se5a opened 4 years ago

se5a commented 4 years ago

Since we're starting to work a bit more on Json files, we should create a list of things we want the error message to display when we get bad json data.

Right now we're crashing/throwing exceptions on most bad json, this is good for now, But eventually we'll want to log it, pop up a dialog with the error, maybe with the option to try reload (so the json can be edited, and then reloaded without recompiling). or to continue without that component being loaded in.

se5a commented 4 years ago

So currently we are logging some errors instead of crashing this is handled by ComponentParseCheck in ComponentDesigner.cs this should be expanded to handle the above cases, and we should do a popup if anything doesn't get loaded.