Handle errors when opening audio via the MRU menu

Originally committed to SVN as r5804.
This commit is contained in:
Thomas Goyne 2011-10-29 04:31:05 +00:00
parent 52a2316934
commit dedccc1f58

View file

@ -69,8 +69,14 @@ struct recent_audio_entry : public Command {
STR_HELP("Open recent audio.") STR_HELP("Open recent audio.")
void operator()(agi::Context *c, int id) { void operator()(agi::Context *c, int id) {
try {
c->audioController->OpenAudio(lagi_wxString(config::mru->GetEntry("Audio", id))); c->audioController->OpenAudio(lagi_wxString(config::mru->GetEntry("Audio", id)));
} }
catch (agi::UserCancelException const&) { }
catch (agi::Exception const& e) {
wxMessageBox(lagi_wxString(e.GetChainedMessage()), "Error loading file", wxICON_ERROR | wxOK);
}
}
}; };
struct recent_keyframes_entry : public Command { struct recent_keyframes_entry : public Command {