CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Private Attributes
UncatchedException Class Reference

#include <UncatchedException.h>

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.

9  {
10  LockMutex a(mutex);
11  count_++;
12 }
static LockMutex::Mutex mutex
double a
Definition: hdecay.h:121
UncatchedException::UncatchedException ( const cms::Exception err)
explicit

Definition at line 14 of file CMSexception.cc.

References a, count_, edm::hlt::Exception, it, and mutex.

14  {
15  LockMutex a(mutex);
16  count_++;
17  //this is bad but needed in order to make transition
18  it = new cms::Exception(err);
19 }
static cms::Exception * it
static LockMutex::Mutex mutex
double a
Definition: hdecay.h:121

Member Function Documentation

int UncatchedException::count ( void  )
static

Definition at line 40 of file CMSexception.cc.

References a, count_, and mutex.

Referenced by rethrow().

40  {
41  LockMutex a(mutex);
42  return count_;
43 }
static LockMutex::Mutex mutex
double a
Definition: hdecay.h:121
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().

21  {
22  if (!it) return;
23  Genexception * exp = dynamic_cast<Genexception*>(it);
24  if (exp) exp->dump(o,det);
25  else o << it->what() << std::endl;
26 }
virtual char const * what() const
Definition: Exception.cc:97
static cms::Exception * it
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
void dump(std::ostream &o, bool it=false) const
Definition: CMSexception.cc:78
void UncatchedException::rethrow ( void  )
static

Definition at line 28 of file CMSexception.cc.

References count(), and it.

28  {
29  if (count()==0) return;
30  std::string mess("found "); mess+=toa()(count());
31  mess+= " uncaught exceptions";
32  if (!it) throw Genexception(mess);
33 
34  //bad but needed in order to make transition to standard CMS exceptions
35  throw *it;
36  //it->rethrow();
37 
38 }
static cms::Exception * it
Definition: ioutils.h:94
static int count()
Definition: CMSexception.cc:40

Member Data Documentation

int UncatchedException::count_ =0
staticprivate

Definition at line 30 of file UncatchedException.h.

Referenced by count(), and UncatchedException().

cms::Exception * UncatchedException::it =0
staticprivate

Definition at line 27 of file UncatchedException.h.

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

LockMutex::Mutex UncatchedException::mutex
staticprivate

Definition at line 29 of file UncatchedException.h.

Referenced by count(), and UncatchedException().