Changeset 2305 for code/branches/physics/src/util
- Timestamp:
- Dec 2, 2008, 4:53:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/util/Exception.h
r2298 r2305 103 103 : Exception(description, lineNumber, filename, functionName) 104 104 { 105 // let the catcher decide whether to display the message below level 4106 COUT(4) << this->getFullDescription() << std::endl;107 105 } 108 106 … … 110 108 : Exception(description) 111 109 { 112 // let the catcher decide whether to display the message below level 4113 COUT(4) << this->getFullDescription() << std::endl;114 110 } 115 111 … … 148 144 CREATE_ORXONOX_EXCEPTION(GameState); 149 145 146 /** 147 @brief 148 Helper function that creates an exception, displays the message, but doesn't throw it. 149 */ 150 template <class T> 151 inline const T& InternalHandleException(const T& exception) 152 { 153 // let the catcher decide whether to display the message below level 4 154 COUT(4) << exception.getFullDescription() << std::endl; 155 return exception; 156 } 157 150 158 #define ThrowException(type, description) \ 151 throw SpecificException<Exception::type>(description, __LINE__, __FILE__, __FUNCTIONNAME__)159 throw InternalHandleException(SpecificException<Exception::type>(description, __LINE__, __FILE__, __FUNCTIONNAME__)) 152 160 153 161 // define an assert macro that can display a message
Note: See TracChangeset
for help on using the changeset viewer.