Changeset 2101 for code/branches/objecthierarchy/src/util
- Timestamp:
- Nov 2, 2008, 12:09:55 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/util
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/util/Exception.cc
r1810 r2101 38 38 { 39 39 Exception::Exception(const std::string& description, int lineNumber, 40 const char* file Name, const char* functionName)40 const char* filename, const char* functionName) 41 41 : description_(description) 42 42 , lineNumber_(lineNumber) 43 43 , functionName_(functionName) 44 , file Name_(fileName)44 , filename_(filename) 45 45 { } 46 46 … … 49 49 , lineNumber_(0) 50 50 , functionName_("") 51 , file Name_("")51 , filename_("") 52 52 { } 53 53 … … 60 60 fullDesc << this->getTypeName() << "_EXCEPTION"; 61 61 62 if (this->file Name_ != "")62 if (this->filename_ != "") 63 63 { 64 fullDesc << " in " << this->file Name_;64 fullDesc << " in " << this->filename_; 65 65 if (this->lineNumber_) 66 66 fullDesc << "(" << this->lineNumber_ << ")"; -
code/branches/objecthierarchy/src/util/Exception.h
r1810 r2101 67 67 68 68 Exception(const std::string& description, int lineNumber, 69 const char* file Name, const char* functionName);69 const char* filename, const char* functionName); 70 70 Exception(const std::string& description); 71 71 … … 87 87 int lineNumber_; 88 88 std::string functionName_; 89 std::string file Name_;89 std::string filename_; 90 90 // mutable because "what()" is a const method 91 91 mutable std::string fullDescription_; … … 98 98 public: 99 99 SpecificException(const std::string& description, int lineNumber, 100 const char* file Name, const char* functionName)101 : Exception(description, lineNumber, file Name, functionName)100 const char* filename, const char* functionName) 101 : Exception(description, lineNumber, filename, functionName) 102 102 { 103 103 // let the catcher decide whether to display the message below level 4 -
code/branches/objecthierarchy/src/util/SignalHandler.cc
r2030 r2101 58 58 * register signal handlers for SIGSEGV and SIGABRT 59 59 * @param appName path to executable eg argv[0] 60 * @param file Name filename to append backtrace to61 */ 62 void SignalHandler::doCatch( const std::string & appName, const std::string & file Name )60 * @param filename filename to append backtrace to 61 */ 62 void SignalHandler::doCatch( const std::string & appName, const std::string & filename ) 63 63 { 64 64 this->appName = appName; 65 this->file Name = fileName;65 this->filename = filename; 66 66 67 67 // prepare for restoring XAutoKeyRepeat … … 326 326 bt.insert(0, timeString); 327 327 328 FILE * f = fopen( getInstance()->file Name.c_str(), "a" );328 FILE * f = fopen( getInstance()->filename.c_str(), "a" ); 329 329 330 330 if ( !f ) 331 331 { 332 perror( ( std::string( "could not append to " ) + getInstance()->file Name ).c_str() );332 perror( ( std::string( "could not append to " ) + getInstance()->filename ).c_str() ); 333 333 exit(EXIT_FAILURE); 334 334 } … … 336 336 if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() ) 337 337 { 338 COUT(0) << "could not write " << bt.length() << " byte to " << getInstance()->file Name << std::endl;338 COUT(0) << "could not write " << bt.length() << " byte to " << getInstance()->filename << std::endl; 339 339 exit(EXIT_FAILURE); 340 340 } -
code/branches/objecthierarchy/src/util/SignalHandler.h
r2030 r2101 71 71 void registerCallback( SignalCallback cb, void * someData ); 72 72 73 void doCatch( const std::string & appName, const std::string & file Name );73 void doCatch( const std::string & appName, const std::string & filename ); 74 74 void dontCatch(); 75 75 … … 85 85 86 86 std::string appName; 87 std::string file Name;87 std::string filename; 88 88 89 89 // used to turn on KeyAutoRepeat if OIS crashes … … 97 97 public: 98 98 inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }; 99 void doCatch( const std::string & appName, const std::string & file Name ) {};99 void doCatch( const std::string & appName, const std::string & filename ) {}; 100 100 void dontCatch() {}; 101 101 void registerCallback( SignalCallback cb, void * someData ) {};
Note: See TracChangeset
for help on using the changeset viewer.