CMS 3D CMS Logo

Genexception Class Reference

cms generic exception More...

#include <Utilities/General/interface/CMSexception.h>

Inheritance diagram for Genexception:

BaseGenexception CMSexception cms::Exception Capri::Error GenTerminate Capri::Fatal Capri::Severe Capri::Warning

List of all members.

Public Member Functions

void add (Genexception *in) throw ()
virtual cms::Exceptionclone (void) const
void dump (std::ostream &o, bool it=false) const throw ()
 Genexception (const std::string &mess) throw ()
 Genexception () throw ()
virtual void rethrow (void)
const std::string & trace () const throw ()
virtual ~Genexception () throw ()

Private Member Functions

void traceit () throw ()

Private Attributes

own_ptr< Genexceptionnext
std::string trace_


Detailed Description

cms generic exception

Definition at line 59 of file CMSexception.h.


Constructor & Destructor Documentation

Genexception::Genexception (  )  throw ()

Definition at line 59 of file CMSexception.cc.

References traceit().

Referenced by clone().

00059 {traceit();}

Genexception::Genexception ( const std::string &  mess  )  throw ()

Definition at line 62 of file CMSexception.cc.

References traceit().

00062                                                          : 
00063   BaseGenexception(mess) {
00064   traceit();
00065 }

Genexception::~Genexception (  )  throw () [virtual]

Definition at line 68 of file CMSexception.cc.

00068 {}


Member Function Documentation

void Genexception::add ( Genexception in  )  throw ()

Definition at line 70 of file CMSexception.cc.

References own_ptr< X, P >::get(), in, and next.

00070                                                 {
00071   if (in==0) return;
00072   // push in the stack...
00073   if (next.get()) (*next).add(in);
00074   else next = own_ptr<Genexception>(in);
00075 }

virtual cms::Exception* Genexception::clone ( void   )  const [inline, virtual]

Reimplemented from BaseGenexception.

Definition at line 69 of file CMSexception.h.

References Genexception().

00069 { return new Genexception(*this);}

void Genexception::dump ( std::ostream &  o,
bool  it = false 
) const throw ()

Definition at line 78 of file CMSexception.cc.

References lat::endl(), own_ptr< X, P >::get(), it, next, trace(), and BaseGenexception::what().

Referenced by UncatchedException::dump(), Thread::operator()(), and TSqueueConsumer< X, C >::run().

00078                                                               {
00079   if (next.get()) {
00080     (*next).dump(o,it);
00081     o << "Generated by: " ;
00082   }
00083   o << what() << "\n" << std::endl;
00084   if(it) o << trace()<< std::endl;
00085 }

virtual void Genexception::rethrow ( void   )  [inline, virtual]

Reimplemented from BaseGenexception.

Definition at line 70 of file CMSexception.h.

00070 { throw *this;}

const std::string& Genexception::trace (  )  const throw () [inline]

Definition at line 64 of file CMSexception.h.

References trace_.

Referenced by dump().

00064 { return trace_;}

void Genexception::traceit (  )  throw () [private]

Definition at line 90 of file CMSexception.cc.

References a, BackTrace::trace(), and trace_.

Referenced by Genexception().

00090                                    {
00091   std::ostringstream oss;
00092 
00093   BackTrace a;
00094   a.trace(oss);
00095   trace_ = oss.str();
00096 }


Member Data Documentation

own_ptr<Genexception> Genexception::next [private]

Definition at line 78 of file CMSexception.h.

Referenced by add(), and dump().

std::string Genexception::trace_ [private]

Definition at line 76 of file CMSexception.h.

Referenced by trace(), and traceit().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:21:12 2009 for CMSSW by  doxygen 1.5.4