Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 454 for code


Ignore:
Timestamp:
Dec 10, 2007, 5:56:22 PM (17 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

Location:
code/branches/objecthierarchy/src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/CMakeLists.txt

    r453 r454  
    22
    33# create a few variables to simplify life
    4 SET(SRC_FILES orxonox/orxonox.cc loader/LevelLoader.cc xml/xmlParser.cc orxonox/core/IdentifierList.cc orxonox/core/Identifier.cc orxonox/core/MetaObjectList.cc orxonox/core/Factory.cc orxonox/core/OrxonoxClass.cc orxonox/core/ConfigValueContainer.cc orxonox/objects/BaseObject.cc orxonox/objects/test1.cc orxonox/objects/test2.cc orxonox/objects/test3.cc)
    5 SET(INC_FILES loader/LevelLoader.h xml/xmlParser.h orxonox/core/CoreIncludes.h orxonox/core/Debug.h orxonox/core/Identifier.h orxonox/core/Factory.h orxonox/core/ClassFactory.h orxonox/core/IdentifierList.h orxonox/core/ObjectList.h orxonox/core/MetaObjectList.h orxonox/core/Iterator.h orxonox/core/OrxonoxClass.h orxonox/core/ConfigValueContainer.h orxonox/objects/BaseObject.h orxonox/objects/Test.h orxonox/objects/test1.h orxonox/objects/test2.h orxonox/objects/test3.h orxonox/objects/Tickable.h orxonox/objects/Timer.h)
     4SET(SRC_FILES
     5        orxonox/orxonox.cc
     6        loader/LevelLoader.cc
     7        xml/xmlParser.cc
     8        orxonox/core/IdentifierList.cc
     9        orxonox/core/Identifier.cc
     10        orxonox/core/MetaObjectList.cc
     11        orxonox/core/Factory.cc
     12        orxonox/core/OrxonoxClass.cc
     13        orxonox/core/ConfigValueContainer.cc
     14        orxonox/core/SignalHandler.cc
     15        orxonox/objects/BaseObject.cc
     16        orxonox/objects/test1.cc
     17        orxonox/objects/test2.cc
     18        orxonox/objects/test3.cc
     19)
     20
     21SET(INC_FILES
     22        loader/LevelLoader.h
     23        xml/xmlParser.h
     24        orxonox/core/CoreIncludes.h
     25        orxonox/core/Debug.h
     26        orxonox/core/Identifier.h
     27        orxonox/core/Factory.h
     28        orxonox/core/ClassFactory.h
     29        orxonox/core/IdentifierList.h
     30        orxonox/core/ObjectList.h
     31        orxonox/core/MetaObjectList.h
     32        orxonox/core/Iterator.h
     33        orxonox/core/OrxonoxClass.h
     34        orxonox/core/ConfigValueContainer.h
     35        orxonox/core/SignalHandler.h
     36        orxonox/objects/BaseObject.h
     37        orxonox/objects/Test.h
     38        orxonox/objects/test1.h
     39        orxonox/objects/test2.h
     40        orxonox/objects/test3.h
     41        orxonox/objects/Tickable.h
     42        orxonox/objects/Timer.h
     43)
    644
    745#Creates an executable
  • 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.