From 1a90b7d9424f6bc4f6f1fad40bf557fffefb9a74 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 15 Mar 2017 12:14:33 -0400 Subject: [PATCH] TimerRecordDialog: comment why nothing need be done for exceptions --- src/TimerRecordDialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index 426f10cf9..debcf5547 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -684,9 +684,13 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) { break; } + // If we have simply recorded, exported and then plan to Exit/Restart/Shutdown // then we will have a temporary project setup. Let's get rid of that! if (m_bAutoExportEnabled && !m_bAutoSaveEnabled) { + // PRL: Move the following cleanup into a finally? + // No, I think you would want to skip this, in case recording + // succeeded but then save or export threw an exception. DirManager::CleanTempDir(); } } while (false); @@ -694,6 +698,9 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) { // Do we need to cleanup the orphaned temporary project? if (m_bProjectCleanupRequired && !bErrorOverride) { + // PRL: Move the following cleanup into a finally? + // No, I think you would want to skip this, in case recording + // succeeded but then save or export threw an exception. RemoveAllAutoSaveFiles(); }