Simberon Design Minute
 

Shutdown or Recover

When you detect an unhandled exception in your application, what should you do? An easy answer is to shutdown the application and require the user to re-launch it. It's an easy answer but a very annoying one for the user. You can try to recover and continue running, but that can be a tricky venture. The last thing you want is to have some incorrect or partially correct information that's in memory to be written to the database and cause corruption. Corruption of data in the database is very difficult to detect and to fix. If you do choose to recover after a software failure, make sure that all the local data is cleared, that database transactions are aborted and that no corrupt data could possibly find its way into the database. You should also make sure you haven't already performed a recovery recently or you may get into an infinite regress of faults followed by recoveries. Recovering from faults is tricky. Make sure you give it enough thought and testing to make it work properly.

Download