Correct initialization of a module
TanDro opened this issue · comments
If an error in the init of a module happens, there is only the check
pymoskito/pymoskito/simulation_interface.py
Lines 343 to 345 in 044d0bd
but the simulation starts still. Is there a currently implemented possibility to test, if the init was correct?
Background: I run cmake in the init of some new modules and it can happen, that the command fails.
The check you mentioned above only makes sure that all modules which are mandatory for the simulation are actually created.
To reach this check, the 'init' calls of all selected routines must not raise any exception.
If such an exception is raised, the whole application crashes immediately, which can indeed be done better.
Do you want to test the correct behaviour without running a simulation or which other kind of response are you expecting?
Okay, it was not sure, if there is another function, that handle these behaviour.
I do some make stuff in the init to build a library from c source. Now I have added a little exception handling of the initialization of a module. Tank you.