nicer error reporting
This commit is contained in:
parent
f473caf972
commit
8616624957
2 changed files with 7 additions and 7 deletions
12
src/game.cpp
12
src/game.cpp
|
@ -1440,23 +1440,23 @@ bool game_controller::play_multiplayer()
|
|||
} catch(game::game_error& e) {
|
||||
gui::show_error_message(disp(), _("Error while playing the game: ") + e.message);
|
||||
} catch(network::error& e) {
|
||||
ERR_NET << "caught network::error";
|
||||
if(e.message != "") {
|
||||
ERR_NET << ": " << e.message;
|
||||
ERR_NET << "caught network::error: " << e.message << "\n";
|
||||
/* GCC-3.3 needs a temp var otherwise compilation fails */
|
||||
gui::dialog dlg(disp(),"",e.message,gui::OK_ONLY);
|
||||
dlg.show();
|
||||
} else {
|
||||
ERR_NET << "caught network::error\n";
|
||||
}
|
||||
ERR_NET << "\n";
|
||||
} catch(config::error& e) {
|
||||
ERR_CONFIG << "caught config::error";
|
||||
if(e.message != "") {
|
||||
ERR_CONFIG << ": " << e.message;
|
||||
ERR_CONFIG << "caught config::error: " << e.message << "\n";
|
||||
/* GCC-3.3 needs a temp var otherwise compilation fails */
|
||||
gui::dialog dlg2(disp(),"",e.message,gui::OK_ONLY);
|
||||
dlg2.show();
|
||||
} else {
|
||||
ERR_CONFIG << "caught config::error\n";
|
||||
}
|
||||
ERR_CONFIG << "\n";
|
||||
} catch(gamemap::incorrect_format_exception& e) {
|
||||
gui::show_error_message(disp(), std::string(_("The game map could not be loaded: ")) + e.msg_);
|
||||
} catch(game::load_game_exception& e) {
|
||||
|
|
|
@ -197,7 +197,7 @@ create::create(game_display& disp, const config &cfg, chat& c, config& gamelist)
|
|||
eras.push_back((**er)["name"]);
|
||||
}
|
||||
if(eras.empty()) {
|
||||
gui::message_dialog(disp, "", _("No multiplayer sides.")).show();
|
||||
gui::message_dialog(disp, "", _("No eras found.")).show();
|
||||
throw config::error(_("No eras found"));
|
||||
}
|
||||
era_combo_.set_items(eras);
|
||||
|
|
Loading…
Add table
Reference in a new issue