Our current error handling is taking place via while (global_execution_continue) and related breaks.
However, when a spec is created with a module that expects some cleanup, then it does not work!
However, if an FMI2Error occurs within the whileScope then dataWriterInstance.close(); is always issued. However, the automatically inserted error handling will already have cleaned up the dataWriterInstance!
This implies, that we need a much more rich meta-level when generating the specification.
Our current error handling is taking place via while (global_execution_continue) and related breaks. However, when a spec is created with a module that expects some cleanup, then it does not work!
For example, datawriter expects a
close
call.However, if an FMI2Error occurs within the
whileScope
thendataWriterInstance.close();
is always issued. However, the automatically inserted error handling will already have cleaned up the dataWriterInstance!This implies, that we need a much more rich meta-level when generating the specification.