Display an error when the config file is corrupted rather than just crashing
Originally committed to SVN as r4751.
This commit is contained in:
parent
e6b41058d8
commit
459b9e317d
1 changed files with 6 additions and 1 deletions
|
@ -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__
|
||||
|
|
Loading…
Reference in a new issue