|
From: Lasse Kärkkäi. <tr...@us...> - 2012-02-12 02:16:52
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Feb 12 04:16:36 2012 +0200
Use fatal error handling for fatal errors rather than flash messages.
---
game/main.cc | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index db3adde..997e5d3 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -207,15 +207,8 @@ void mainLoop(std::string const& songlist) {
}
}
} catch (std::exception& e) {
- // This should use ScreenManager fatalError, but it cannot
- // yet split the message to multiple lines automatically, so
- // better use flashMessage, which zooms to fit.
- std::cerr << "FATAL ERROR: " << e.what() << std::endl;
- sm.flashMessage(std::string("FATAL ERROR: ") + e.what(), 0.0f); // No fade-in to get it to show
- window.blank();
- sm.drawNotifications();
- window.swap();
- boost::thread::sleep(now() + 2.0);
+ sm.fatalError(e.what()); // Notify the user
+ throw;
} catch (QuitNow&) {
std::cout << "Terminated." << std::endl;
}
|