Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2103 for code/trunk/src/util


Ignore:
Timestamp:
Nov 2, 2008, 12:22:42 AM (16 years ago)
Author:
rgrieder
Message:

Merged r2101 (objecthierarchy) to trunk.

Location:
code/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/util

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/util/Exception.cc

    • Property svn:mergeinfo changed (with no actual effect on merging)
    r2096 r2103  
    3838{
    3939    Exception::Exception(const std::string& description, int lineNumber,
    40                          const char* fileName, const char* functionName)
     40                         const char* filename, const char* functionName)
    4141        : description_(description)
    4242        , lineNumber_(lineNumber)
    4343        , functionName_(functionName)
    44         , fileName_(fileName)
     44        , filename_(filename)
    4545    { }
    4646
     
    4949        , lineNumber_(0)
    5050        , functionName_("")
    51         , fileName_("")
     51        , filename_("")
    5252    { }
    5353
     
    6060            fullDesc << this->getTypeName() << "_EXCEPTION";
    6161
    62             if (this->fileName_ != "")
     62            if (this->filename_ != "")
    6363            {
    64                 fullDesc << " in " << this->fileName_;
     64                fullDesc << " in " << this->filename_;
    6565                if (this->lineNumber_)
    6666                    fullDesc << "(" << this->lineNumber_ << ")";
  • code/trunk/src/util/Exception.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
    r2096 r2103  
    6767
    6868        Exception(const std::string& description, int lineNumber,
    69                   const char* fileName, const char* functionName);
     69                  const char* filename, const char* functionName);
    7070        Exception(const std::string& description);
    7171
     
    8787        int lineNumber_;
    8888        std::string functionName_;
    89         std::string fileName_;
     89        std::string filename_;
    9090        // mutable because "what()" is a const method
    9191        mutable std::string fullDescription_;
     
    9898    public:
    9999        SpecificException(const std::string& description, int lineNumber,
    100                   const char* fileName, const char* functionName)
    101                   : Exception(description, lineNumber, fileName, functionName)
     100                  const char* filename, const char* functionName)
     101                  : Exception(description, lineNumber, filename, functionName)
    102102        {
    103103            // let the catcher decide whether to display the message below level 4
  • code/trunk/src/util/SignalHandler.cc

    • Property svn:mergeinfo changed (with no actual effect on merging)
    r2087 r2103  
    5858 * register signal handlers for SIGSEGV and SIGABRT
    5959 * @param appName path to executable eg argv[0]
    60  * @param fileName filename to append backtrace to
    61  */
    62 void SignalHandler::doCatch( const std::string & appName, const std::string & fileName )
     60 * @param filename filename to append backtrace to
     61 */
     62void SignalHandler::doCatch( const std::string & appName, const std::string & filename )
    6363{
    6464  this->appName = appName;
    65   this->fileName = fileName;
     65  this->filename = filename;
    6666
    6767  // prepare for restoring XAutoKeyRepeat
     
    326326  bt.insert(0, timeString);
    327327
    328   FILE * f = fopen( getInstance()->fileName.c_str(), "a" );
     328  FILE * f = fopen( getInstance()->filename.c_str(), "a" );
    329329
    330330  if ( !f )
    331331  {
    332     perror( ( std::string( "could not append to " ) + getInstance()->fileName ).c_str() );
     332    perror( ( std::string( "could not append to " ) + getInstance()->filename ).c_str() );
    333333    exit(EXIT_FAILURE);
    334334  }
     
    336336  if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() )
    337337  {
    338     COUT(0) << "could not write " << bt.length() << " byte to " << getInstance()->fileName << std::endl;
     338    COUT(0) << "could not write " << bt.length() << " byte to " << getInstance()->filename << std::endl;
    339339    exit(EXIT_FAILURE);
    340340  }
  • code/trunk/src/util/SignalHandler.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
    r2087 r2103  
    7171    void registerCallback( SignalCallback cb, void * someData );
    7272
    73     void doCatch( const std::string & appName, const std::string & fileName );
     73    void doCatch( const std::string & appName, const std::string & filename );
    7474    void dontCatch();
    7575
     
    8585
    8686    std::string appName;
    87     std::string fileName;
     87    std::string filename;
    8888
    8989    // used to turn on KeyAutoRepeat if OIS crashes
     
    9797  public:
    9898    inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; };
    99     void doCatch( const std::string & appName, const std::string & fileName ) {};
     99    void doCatch( const std::string & appName, const std::string & filename ) {};
    100100    void dontCatch() {};
    101101    void registerCallback( SignalCallback cb, void * someData ) {};
Note: See TracChangeset for help on using the changeset viewer.