CMS 3D CMS Logo

UncatchedException Class Reference

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

List of all members.

Public Member Functions

 UncatchedException (const cms::Exception &err)
 UncatchedException ()

Static Public Member Functions

static int count ()
static void dump (std::ostream &o, bool det=false)
static void rethrow ()

Static Private Attributes

static int count_ = 0
static cms::Exceptionit = 0
static LockMutex::Mutex mutex


Detailed Description

Definition at line 16 of file UncatchedException.h.


Constructor & Destructor Documentation

UncatchedException::UncatchedException (  ) 

Definition at line 9 of file CMSexception.cc.

References a, count_, and mutex.

00009                                        {
00010   LockMutex a(mutex);
00011   count_++;
00012 }

UncatchedException::UncatchedException ( const cms::Exception err  )  [explicit]

Definition at line 14 of file CMSexception.cc.

References a, count_, Exception, it, and mutex.

00014                                                                {
00015   LockMutex a(mutex);
00016   count_++;
00017   //this is bad but needed in order to make transition
00018   it = new cms::Exception(err);
00019 }


Member Function Documentation

int UncatchedException::count ( void   )  [static]

Definition at line 40 of file CMSexception.cc.

References a, count_, and mutex.

Referenced by rethrow().

00040                               {
00041   LockMutex a(mutex);
00042   return count_;
00043 }

void UncatchedException::dump ( std::ostream &  o,
bool  det = false 
) [static]

Definition at line 21 of file CMSexception.cc.

References Genexception::dump(), lat::endl(), funct::exp(), it, and cms::Exception::what().

00021                                                       {
00022   if (!it) return;
00023   Genexception * exp = dynamic_cast<Genexception*>(it);
00024   if (exp) exp->dump(o,det);
00025   else o << it->what() << std::endl;
00026 }

void UncatchedException::rethrow ( void   )  [static]

Definition at line 28 of file CMSexception.cc.

References count(), and it.

00028                                  {
00029   if (count()==0) return;
00030   std::string mess("found "); mess+=toa()(count());
00031   mess+= " uncaught exceptions";
00032   if (!it) throw Genexception(mess);
00033 
00034   //bad but needed in order to make transition to standard CMS exceptions
00035   throw *it;
00036   //it->rethrow();
00037   
00038 }


Member Data Documentation

int UncatchedException::count_ = 0 [static, private]

Definition at line 30 of file UncatchedException.h.

Referenced by count(), and UncatchedException().

cms::Exception * UncatchedException::it = 0 [static, private]

Definition at line 27 of file UncatchedException.h.

Referenced by dump(), rethrow(), and UncatchedException().

LockMutex::Mutex UncatchedException::mutex [static, private]

Definition at line 29 of file UncatchedException.h.

Referenced by count(), and UncatchedException().


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