return 1;
}
- debugmode = commandLineOptions[DEBUG];
-
// !!! FIXME: we could use a Win32 API for this. --ryan.
#ifndef WIN32
chdirToAppPath(argv[0]);
LOGFUNC;
- //~ try {
+#ifdef NDEBUG
+ try {
+#endif
{
newGame();
return 42;
}
+ if (commandLineOptions[DEBUG]) {
+ debugmode = true;
+ }
+
bool gameDone = false;
bool gameFocused = true;
CleanUp ();
return 0;
- //~ } catch (const std::exception& error) {
- //~ CleanUp();
+#ifdef NDEBUG
+ } catch (const std::exception& error) {
+ CleanUp();
- //~ std::string e = "Caught exception: ";
- //~ e += error.what();
+ std::string e = "Caught exception: ";
+ e += error.what();
- //~ LOG(e);
+ LOG(e);
- //~ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Exception catched", error.what(), NULL);
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Exception catched", error.what(), NULL);
- //~ return -1;
- //~ }
+ return -1;
+ }
+#endif
}