Skip to content
Snippets Groups Projects
Commit b22f352e authored by David Fairbrother's avatar David Fairbrother
Browse files

Re #22901 Add top level try-catch to project recovery

parent 92a74226
No related branches found
No related tags found
No related merge requests found
...@@ -16769,11 +16769,24 @@ bool ApplicationWindow::saveProjectRecovery(std::string destination) { ...@@ -16769,11 +16769,24 @@ bool ApplicationWindow::saveProjectRecovery(std::string destination) {
} }
   
void ApplicationWindow::checkForProjectRecovery() { void ApplicationWindow::checkForProjectRecovery() {
if (!m_projectRecovery.checkForRecovery()) { if (!m_projectRecovery.checkForRecovery()) {
m_projectRecovery.startProjectSaving(); m_projectRecovery.startProjectSaving();
return; return;
}
// Recovery file present
try {
m_projectRecovery.attemptRecovery();
}
catch (std::exception &e) {
std::string err{ "Project Recovery failed to recover this checkpoint. Details: " };
err.append(e.what());
g_log.error(err);
QMessageBox::information(this, "Could Not Recover",
"We could not fully recover your work.\nMantid will continue to run normally now.", "OK");
// Restart project recovery manually
m_projectRecovery.clearAllCheckpoints();
m_projectRecovery.startProjectSaving();
} }
// Recovery file present
m_projectRecovery.attemptRecovery();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment