Polish exceptions.
Catch be const ref and rethrow the original exception.
This commit is contained in:
parent
9bb854891f
commit
2b2ab9d61e
1 changed files with 4 additions and 4 deletions
|
@ -387,13 +387,13 @@ LEVEL_RESULT playsingle_controller::play_scenario(
|
|||
save = true;
|
||||
} //end for loop
|
||||
|
||||
} catch(game::load_game_exception& lge) {
|
||||
} catch(const game::load_game_exception& lge) {
|
||||
// Loading a new game is effectively a quit.
|
||||
//
|
||||
if (lge.game != "") {
|
||||
gamestate_ = game_state();
|
||||
}
|
||||
throw lge;
|
||||
throw;
|
||||
} catch (end_level_exception &end_level_exn) {
|
||||
if(!past_prestart) {
|
||||
draw_solid_tinted_rectangle(
|
||||
|
@ -748,12 +748,12 @@ void playsingle_controller::linger()
|
|||
play_slice();
|
||||
gui_->draw();
|
||||
}
|
||||
} catch(game::load_game_exception& lge) {
|
||||
} catch(const game::load_game_exception& lge) {
|
||||
// Loading a new game is effectively a quit.
|
||||
if (lge.game != "") {
|
||||
gamestate_ = game_state();
|
||||
}
|
||||
throw lge;
|
||||
throw;
|
||||
}
|
||||
|
||||
// revert the end-turn button text to its normal label
|
||||
|
|
Loading…
Add table
Reference in a new issue