ISISComputingGroup / lewis-ess

Let's write intricate simulators!
GNU General Public License v3.0
21 stars 19 forks source link

get_submodules fails silently on import_module exception #277

Closed aaron-long closed 4 years ago

aaron-long commented 4 years ago

The get_submodules utility has a try/exception case for using importlib.import_module but the exception case is a pass. In the event that a submodule fails to load, there will be no feedback to the user of this. If they then wish to then run the failed submodule it will not be in the submodules list, and lewis will output the standard No device with the name error.

I've added a log to the get_submodules utility method so that users will see if any submodules they are trying to load fail.

One might have a number submodules that fail to load, even if they don't run them, so it is useful feedback for debugging.

aaron-long commented 4 years ago