|
std::ostream & | operator<< (std::ostream &ost, Exception const &e) |
|
template<typename E , typename T > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type & | operator<< (E &e, T const &stuff) |
|
template<typename E , typename T > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & | operator<< (E const &e, T const &stuff) |
|
template<typename E > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type & | operator<< (E &e, std::ostream &(*f)(std::ostream &)) |
|
template<typename E > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & | operator<< (E const &e, std::ostream &(*f)(std::ostream &)) |
|
template<typename E > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type & | operator<< (E &e, std::ios_base &(*f)(std::ios_base &)) |
|
template<typename E > |
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & | operator<< (E const &e, std::ios_base &(*f)(std::ios_base &)) |
|
This a basic exception type expected to be thrown by developer-written code. We recommend that you use it directly. It can also be used as a base class if needed.
Each Exception is identified by a category string. This category is a short word or phrase (no spaces) that described the problem that was encountered.
Information can be added to the Exception using the stream insertion operator (as one uses cout). We recommend using it in the following manner:
Example: if ((rc=func()) < 0) { throw cms::Exception("DataCorrupt") << "I died with rc = " << rc << std::endl; }
Derived types are expected to fix the category, either by 1) passing a string literal to the base class constructor, or 2) ensuring the developer gives a category name.
Example: class InfiniteLoop : public Exception { InfiniteLoop(const std::string& msg) : Exception("InfiniteLoop",msg) { } };