13
0

library dialog: catch exception and behave appropriately

This commit is contained in:
Paul Davis 2022-09-26 01:10:14 -06:00
parent f2eddd404b
commit d39f064756

View File

@ -208,8 +208,14 @@ LibraryDownloadDialog::download (Gtk::TreePath const & path)
{ {
Gtk::TreeModel::iterator row = _model->get_iter (path); Gtk::TreeModel::iterator row = _model->get_iter (path);
std::string url = (*row)[_columns.url]; std::string url = (*row)[_columns.url];
PBD::Downloader* downloader;
PBD::Downloader* downloader = new PBD::Downloader (url, ARDOUR::Config->get_clip_library_dir()); try {
downloader = new PBD::Downloader (url, ARDOUR::Config->get_clip_library_dir());
} catch (...) {
(*row)[_columns.install] = _("Error");
return;
}
/* setup timer callback to update progressbar */ /* setup timer callback to update progressbar */