Handle errors when opening audio via the MRU menu
Originally committed to SVN as r5804.
This commit is contained in:
parent
52a2316934
commit
dedccc1f58
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue