Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2259 for code


Ignore:
Timestamp:
Nov 25, 2008, 8:47:52 AM (16 years ago)
Author:
rgrieder
Message:

The idea with exceptions is that you can throw them without having the user to actually see. Imagine a parser: Whenever it encounters something really bad, an exception is thrown. But the message you would like to display might be much nicer, for instance "Could not parse the selected file. Error in line ##".
Btw: There is a little explanation just above the code in Exception.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/util/Exception.h

    r2257 r2259  
    8686               Note: Don't place this code in Exception c'tor because getTypeName() \
    8787               is still pure virtual at that time. */                               \
    88             COUT(1) << this->getFullDescription() << std::endl;                     \
     88            COUT(4) << this->getFullDescription() << std::endl;                     \
    8989        }                                                                           \
    9090                                                                                    \
    9191        ExceptionName##Exception(const std::string& description)                    \
    9292                  : Exception(description)                                          \
    93         { COUT(1) << this->getFullDescription() << std::endl; }                     \
     93        { COUT(4) << this->getFullDescription() << std::endl; }                     \
    9494                                                                                    \
    9595        ~ExceptionName##Exception() throw() { }                                     \
Note: See TracChangeset for help on using the changeset viewer.