vector<boost::filesystem::path> history = Config::instance()->player_history ();
int n = event.GetId() - ID_file_history;
if (n >= 0 && n < static_cast<int> (history.size ())) {
- load_dcp (history[n]);
+ try {
+ load_dcp (history[n]);
+ } catch (exception& e) {
+ error_dialog (0, std_to_wx(String::compose(wx_to_std(_("Could not load DCP %1.")), history[n])), std_to_wx(e.what()));
+ }
}
}
int pos = _history_position;
+ /* Clear out non-existant history items before we re-build the menu */
+ Config::instance()->clean_player_history ();
vector<boost::filesystem::path> history = Config::instance()->player_history ();
if (!history.empty ()) {
} else {
dcpomatic_log.reset (new NullLog());
}
- dcpomatic_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR);
+ dcpomatic_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR | LogEntry::TYPE_DEBUG_PLAYER);
}
}