Display an error when the config file is corrupted rather than just crashing

Originally committed to SVN as r4751.
This commit is contained in:
Thomas Goyne 2010-08-25 19:31:11 +00:00
parent e6b41058d8
commit 459b9e317d
1 changed files with 6 additions and 1 deletions

View File

@ -184,7 +184,12 @@ bool AegisubApp::OnInit() {
// Might be worth displaying an error in the second case
}
#endif
config::opt->ConfigUser();
try {
config::opt->ConfigUser();
}
catch (agi::Exception const& err) {
wxMessageBox(L"Configuration file is invalid. Error reported:\n" + lagi_wxString(err.GetMessage()), L"Error");
}
#ifdef __VISUALC__