Changeset 6412 for code/branches/pickup2/src/libraries/util/Exception.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/libraries/util/Exception.cc
r5781 r6412 49 49 : description_(description) 50 50 , lineNumber_(0) 51 , functionName_("")52 , filename_("")53 51 { } 54 52 … … 61 59 const std::string& Exception::getFullDescription() const 62 60 { 63 if (fullDescription_ == "")61 if (fullDescription_.empty()) 64 62 { 65 63 std::ostringstream fullDesc; … … 67 65 fullDesc << this->getTypeName() << "Exception"; 68 66 69 if ( this->filename_ != "")67 if (!this->filename_.empty()) 70 68 { 71 69 fullDesc << " in " << this->filename_; 72 70 if (this->lineNumber_) 73 fullDesc << "(" << this->lineNumber_ << ")";71 fullDesc << '(' << this->lineNumber_ << ')'; 74 72 } 75 73 76 if ( this->functionName_ != "")77 fullDesc << " in function '" << this->functionName_ << "'";74 if (!this->functionName_.empty()) 75 fullDesc << " in function '" << this->functionName_ << '\''; 78 76 79 77 fullDesc << ": "; 80 if ( this->description_ != "")78 if (!this->description_.empty()) 81 79 fullDesc << this->description_; 82 80 else 83 81 fullDesc << "No description available."; 84 82 85 this->fullDescription_ = std::string(fullDesc.str());83 this->fullDescription_ = fullDesc.str(); 86 84 } 87 85
Note: See TracChangeset
for help on using the changeset viewer.