]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.cc
better logging (maybe) and exception handling
[chaz/yoink] / src / Moof / Engine.cc
index d7d04a846af6bc54753551d1135d582b481fab06..c74ace8ef2207428f360dc5ae397d663539aca28 100644 (file)
@@ -55,16 +55,19 @@ public:
        {
                if (SDL_Init(SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD) != 0)
                {
-                       throw Exception(SDL_GetError());
+                       std::cerr << "sdl is complaining: " << SDL_GetError() << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
                if (FE_Init() != 0)
                {
-                       throw Exception(FE_GetError());
+                       std::cerr << "fast events error: " << FE_GetError() << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
-               if (Sound_Init() != 0)
+               if (Sound_Init() == 0)
                {
-                       //throw Exception(Sound_GetError());
-                       std::cerr << Sound_GetError() << std::endl;
+                       std::cerr << "sound initialization failed: " << Sound_GetError()
+                               << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
                alutInit(&argc, argv);
 
This page took 0.018127 seconds and 4 git commands to generate.