Closed spaulaus closed 7 years ago
The Pugixml library caught the error and the code exited cleanly
The Error handling on the Globals parsing caught the error and the program exited cleanly.
The code caught the error when checking the root node integrety, and the code exited cleanly.
The map node information was printed to the screen and the information was properly read from the configuration file.
The changes were reflected.
The program simply ignored the extraneous information and parsed everything in the map correctly. Note: Maybe we should add some additional error handling so that users are warned of this? Will create a separate issue to address this.
verbose="true"
from Map nodeThe map information was not printed to the screen.
The program simply continued on without issue.
The program ran without issue and the changes were reflected.
The program ran without issue and the changes were reflected.
The program ran without issue and the changes were reflected.
The program ran without issue and the changes were reflected. It told us that it was ignored.
The program simply continued on without issue.
Description of the problem
Right now we have little to no error handling on the utkscan configuration file. We currently have 5 separate files that read the configuration, and three of those five read the same node multiple times. This also breaks a fundamental idea that a class should have just one function. Therefore, we need to remove the XML reading functionality from the classes to help ensure that they do not take on too much responsibility. Here is the breakdown of the current nodes in the configuration and where they are read
Proposed Solution
I propose that we create an XmlInterface and XmlParser in Resources. This provides us with some base classes that can be used to implement XML reading for any of the programs not just utkscan.
XmlInterface
The XmlInterface will be a singleton that does the following operations:
XmlParser
The XmlParser class provides basic functionality of parsing various nodes. This class also provides some error handling methods that can be used in the children since they will all need some kind of verification.
Cleaning up of the Globals class
The Globals class has historically had a lot of information in it that it did not actually need. For example it had physical constants, type definitions and functions. All of these will be moved to the appropriate places. This class will now at it's core just be a way to access information that is stored in the XML file.