CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Static Private Attributes

UncatchedException Class Reference

#include <UncatchedException.h>

List of all members.

Public Member Functions

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

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.

                                       {
  LockMutex a(mutex);
  count_++;
}
UncatchedException::UncatchedException ( const cms::Exception err) [explicit]

Definition at line 14 of file CMSexception.cc.

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

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

Member Function Documentation

int UncatchedException::count ( void  ) [static]

Definition at line 40 of file CMSexception.cc.

References a, count_, and mutex.

Referenced by rethrow().

                              {
  LockMutex a(mutex);
  return count_;
}
void UncatchedException::dump ( std::ostream &  o,
bool  det = false 
) [static]

Definition at line 21 of file CMSexception.cc.

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

                                                      {
  if (!it) return;
  Genexception * exp = dynamic_cast<Genexception*>(it);
  if (exp) exp->dump(o,det);
  else o << it->what() << std::endl;
}
void UncatchedException::rethrow ( void  ) [static]

Definition at line 28 of file CMSexception.cc.

References count(), it, and AlCaHLTBitMon_QueryRunRegistry::string.

                                 {
  if (count()==0) return;
  std::string mess("found "); mess+=toa()(count());
  mess+= " uncaught exceptions";
  if (!it) throw Genexception(mess);

  //bad but needed in order to make transition to standard CMS exceptions
  throw *it;
  //it->rethrow();
  
}

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().

Definition at line 29 of file UncatchedException.h.

Referenced by count(), and UncatchedException().