Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2007, 5:56:22 PM (16 years ago)
Author:
landauf
Message:

no idea if this works: added chrigis SignalHandler from orxonox_v1 to catch SIGSEGV, SIGABRT and SIGILL signals and write debug informations into orxonox.log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/orxonox.cc

    r443 r454  
    4343
    4444#include "core/CoreIncludes.h"
     45#include "core/SignalHandler.h"
    4546#include "objects/Tickable.h"
    4647#include "objects/Timer.h"
     
    781782using namespace Ogre;
    782783
    783 #if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
    784 #define WIN32_LEAN_AND_MEAN
    785 #include "windows.h"
    786 
    787              INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
    788 #else
     784//#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
     785//#define WIN32_LEAN_AND_MEAN
     786//#include "windows.h"
     787
     788//             INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
     789//#else
    789790             int main(int argc, char **argv)
    790 #endif
     791//#endif
    791792{
    792793  try
    793794  {
     795    SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
    794796    orxonox::OrxApplication orxonox;
    795797    orxonox.go();
     
    797799  catch(Exception& e)
    798800  {
    799 #if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
    800     MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
    801 #else
     801//#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
     802//    MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
     803//#else
    802804    fprintf(stderr, "An exception has occurred: %s\n",
    803805            e.getFullDescription().c_str());
    804 #endif
     806//#endif
    805807  }
    806808
Note: See TracChangeset for help on using the changeset viewer.