mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 11:07:41 +00:00
Return non-zero from main() in two exception cases
This commit is contained in:
parent
7a598ef3ed
commit
60fb547be5
@ -2475,6 +2475,7 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
} catch(gui::button::error&) {
|
||||
std::cerr << "Could not create button: Image could not be found\n";
|
||||
return 1;
|
||||
} catch(CVideo::quit&) {
|
||||
//just means the game should quit
|
||||
} catch(end_level_exception&) {
|
||||
@ -2486,6 +2487,7 @@ int main(int argc, char** argv)
|
||||
} catch(game_logic::formula_error& e) {
|
||||
std::cerr << e.what()
|
||||
<< "\n\nGame will be aborted.\n";
|
||||
return 1;
|
||||
} catch(game::error &) {
|
||||
// A message has already been displayed.
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user