Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2008, 9:23:11 PM (16 years ago)
Author:
rgrieder
Message:
  • Finished CommandLineArgument completely. You can also use SetCommandLineSwitch to define boolean switches.
  • Added StaticConversion to Covert.h (compile time type conversion checking)
  • Fixed a bug in Exception
  • Added getAllStrings() to SubString
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/core/Exception.cc

    r1638 r1664  
    5252    { }
    5353
    54     std::string Exception::getFullDescription() const
     54    const std::string& Exception::getFullDescription() const
    5555    {
    56         std::ostringstream fullDesc;
     56        if (fullDescription_ == "")
     57        {
     58            std::ostringstream fullDesc;
    5759
    58         fullDesc << this->getTypeName() << "_EXCEPTION";
     60            fullDesc << this->getTypeName() << "_EXCEPTION";
    5961
    60         if (this->fileName_ != "")
    61         {
    62             fullDesc << " in " << this->fileName_;
    63             if (this->lineNumber_)
    64                 fullDesc << "(" << this->lineNumber_ << ")";
     62            if (this->fileName_ != "")
     63            {
     64                fullDesc << " in " << this->fileName_;
     65                if (this->lineNumber_)
     66                    fullDesc << "(" << this->lineNumber_ << ")";
     67            }
     68
     69            if (this->functionName_ != "")
     70                fullDesc << " in function '" << this->functionName_ << "'";
     71
     72            fullDesc << ": ";
     73            if (this->description_ != "")
     74                fullDesc << this->description_;
     75            else
     76                fullDesc << "No description available.";
     77
     78            this->fullDescription_ = std::string(fullDesc.str());
    6579        }
    6680
    67         if (this->functionName_ != "")
    68             fullDesc << " in function '" << this->functionName_ << "'";
    69 
    70         fullDesc << ": ";
    71         if (this->description_ != "")
    72             fullDesc << this->description_;
    73         else
    74             fullDesc << "No description available.";
    75 
    76         return fullDesc.str();
     81        return fullDescription_;
    7782    }
    7883
Note: See TracChangeset for help on using the changeset viewer.