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,7 +69,13 @@ 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) {
c->audioController->OpenAudio(lagi_wxString(config::mru->GetEntry("Audio", id))); try {
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);
}
} }
}; };