Monday, March 19, 2018

Policy Plus - Better ADMX loader

Today I finally got around to addressing this issue report, which pointed out the Policy Plus fails the entire workspace load upon hitting one problem. I added exception handlers to AdmxBundle so that it keeps track of problems but carries on. I could have just done this by making a list of error messages as strings, but it seems weird for the ADMX loader class to care about how its complaints are displayed to the user, so instead it returns a list of objects that represent the failures and expose some properties of them. They provide a ToString override that the main UI uses to show them, but other consumers of the class could do their own rendering. All uses of the ADMX loading functions from the main form are now wrapped in code that notifies the user of the specific problems.

These changes are live on GitHub.

No comments:

Post a Comment