Catch all exceptions in the editors in order to show an error dialog.

(This is the same as what the game already does.)
This commit is contained in:
2014-12-18 12:52:01 -05:00
parent c1d489c636
commit 5d8f974742
2 changed files with 24 additions and 2 deletions

View File

@@ -78,6 +78,7 @@ rectangle right_sbar_rect;
//Changed to ISO C specified argument and return type.
int main(int, char* argv[]) {
try {
init_menubar();
//outdoor_record_type dummy_outdoor, *store2;
@@ -132,7 +133,17 @@ int main(int, char* argv[]) {
Handle_One_Event();
close_program();
return 0;
return 0;
} catch(std::exception& x) {
giveError(x.what());
throw;
} catch(std::string& x) {
giveError(x);
throw;
} catch(...) {
giveError("An unknown error occurred!");
throw;
}
}
//