don't say "can throw" and then fail to catch

git-svn-id: svn://localhost/ardour2/branches/3.0@12347 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2012-05-20 20:59:38 +00:00
parent 9c5bcc0f10
commit 9e50baae63

View File

@@ -600,8 +600,12 @@ Session::import_audiofiles (ImportStatus& status)
std::copy (all_new_sources.begin(), all_new_sources.end(), std::back_inserter(status.sources));
} else {
// this can throw...but it seems very unlikely
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
try {
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
} catch (...) {
error << _("Failed to remove some files after failed/cancelled import operation") << endmsg;
}
}
status.done = true;