iut-ibk / DynaMind-ToolBox

DynaMind-ToolBox
www.dance4water.org
GNU General Public License v2.0
9 stars 6 forks source link

Exit (or return) code of executable if Error occurred #307

Open csaf4370 opened 9 years ago

csaf4370 commented 9 years ago

Currently the return code for failed simulations (e.g. db init failed) is 0. could the return code be != 0 if something critical failed?

attozeta commented 9 years ago

Unfortunately https://github.com/iut-ibk/DynaMind-ToolBox/commit/524804961676e023dc889e72ab6d01cca198d5a0 does not resolve the issue as we will ALWAYS fail to load some stuff which is ignored at the moment. This may also be related to https://github.com/iut-ibk/DynaMind-ToolBox/issues/308.

You get a full list via

dynamind --loglevel 0 <mymodel.dyn>

which shows quite some stuff that we whould never try to load (like e.g. CMakeLists.txt) which resides in $BUILD/output/PythonModules/scripts.

However I agree that we should fail early, so reopened.

christianurich commented 9 years ago

Yeah, that is designed chaos. If modules are added through the Directory method it tries every file in the folder. Should be fine to remove this option just register the individual files.

Another thing would be using the simulation status, it should return an error code if the execution of check fails