Changeset 2662 for code/trunk/src/core/RootGameState.cc
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/core/RootGameState.cc
r2103 r2662 31 31 #include "util/Debug.h" 32 32 #include "util/Exception.h" 33 #include "Core.h"34 33 #include "Clock.h" 35 34 #include "CommandLine.h" … … 123 122 /** 124 123 @brief 124 Main loop of the orxonox game. 125 125 Starts the game. The little 'while' denotes the main loop. 126 126 Whenever the root state is selected, the game ends. 127 127 @param name 128 128 State to start with (usually main menu or specified by command line) 129 @note 130 We use the Ogre::Timer to measure time since it uses the most precise 131 method an a platform (however the windows timer lacks time when under 132 heavy kernel load!). 129 133 */ 130 134 void RootGameState::start() 131 135 { 132 #ifdef NDEBUG 136 // Don't catch errors when having a debugger in msvc 137 #if ORXONOX_COMPILER != ORXONOX_COMPILER_MSVC || defined(NDEBUG) 133 138 try 134 139 { … … 136 141 // start global orxonox time 137 142 Clock clock; 138 139 // create the Core settings to configure the output level140 Core::getInstance();141 143 142 144 this->activate(); … … 156 158 157 159 this->deactivate(); 158 #if def NDEBUG160 #if ORXONOX_COMPILER != ORXONOX_COMPILER_MSVC || defined(NDEBUG) 159 161 } 160 162 // Note: These are all unhandled exceptions that should not have made its way here! … … 162 164 catch (std::exception& ex) 163 165 { 164 COUT(1) << ex.what() << std::endl; 165 COUT(1) << "Program aborted." << std::endl; 166 COUT(0) << ex.what() << std::endl; 167 COUT(0) << "Program aborted." << std::endl; 168 abort(); 166 169 } 167 170 // anything that doesn't inherit from std::exception 168 171 catch (...) 169 172 { 170 COUT(1) << "An unidentifiable exception has occured. Program aborted." << std::endl; 173 COUT(0) << "An unidentifiable exception has occured. Program aborted." << std::endl; 174 abort(); 171 175 } 172 176 #endif
Note: See TracChangeset
for help on using the changeset viewer.