PKua007 / rampack

Random And Maximal PACKing PACKage
Boost Software License 1.0
2 stars 1 forks source link

Truncated trajectrory file when exception is thrown #23

Closed PKua007 closed 1 year ago

PKua007 commented 1 year ago

When an exception is thrown during the simulation, a RAMTRJ trajectory is truncated and cannot be loaded again. It should be correctly stored - throwing an exception calls destructors, and a SimulationRecorder instance is stored as std::unique_ptr, so all appropriate closing methods should be executed. But it is not what actually happens.

PKua007 commented 1 year ago

Reason: throwing an exception calls destructors, but only when it is catched.