Save loaded models when application crashes

Issue #316 new
Matthias Schoettle created an issue

Unfortunately it can happen that TouchCORE crashes. To limit the frustration of the user, we should detect the crash and save the current opened model(s) in a specific place and show a message to the user.

Often, the application crashes when model changes are made and the view updates, where something goes wrong. So I imagine the following:

  • The crash is detected (we might be able to do this in RamApp.draw() which is called repeatedly and inside the called method runApplication any uncaught exception is "caught"). So we can put the call to super.draw() within a try-catch block.
  • Because the crash most likely happened during the exception of commands, undo the latest command
  • Save the model (or perhaps all models/the complete concern in a specific directory). Here we need to make sure that the complete model can be loaded.
  • Show error message to the user.

If we could prevent the application to crash completely that would be even better.

Comments (0)

  1. Log in to comment