Changeset 3238 for code/branches/core4/src/util
- Timestamp:
- Jun 28, 2009, 1:47:57 PM (15 years ago)
- Location:
- code/branches/core4/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/util/Exception.cc
r3196 r3238 64 64 std::ostringstream fullDesc; 65 65 66 fullDesc << this->getTypeName() << " _EXCEPTION";66 fullDesc << this->getTypeName() << "Exception"; 67 67 68 68 if (this->filename_ != "") … … 87 87 return fullDescription_; 88 88 } 89 90 //! Returns the error description 91 const char* Exception::what() const throw() 92 { 93 return getDescription().c_str(); 94 } 89 95 } -
code/branches/core4/src/util/Exception.h
r3196 r3238 68 68 //! Needed for compatibility with std::exception 69 69 virtual ~Exception() throw() { } 70 const char* what() const throw(); 70 71 71 72 //! Returns a full description with type, line, file and function … … 81 82 //! Returns the filename in which the exception occurred. 82 83 virtual const std::string& getFilename() const { return this->filename_; } 83 84 //! Returns a full description of the error.85 const char* what() const throw() { return getFullDescription().c_str(); }86 84 87 85 protected: … … 152 150 Exception description as string 153 151 */ 154 #define ThrowException(type, description , ...) \152 #define ThrowException(type, description) \ 155 153 throw orxonox::exceptionThrowerHelper(type##Exception(static_cast<std::ostringstream&>(std::ostringstream().flush() << description).str(), __LINE__, __FILE__, __FUNCTIONNAME__)) 156 154
Note: See TracChangeset
for help on using the changeset viewer.