CMS 3D CMS Logo

edm::CodedException< Code > Class Template Reference

#include <FWCore/Utilities/interface/CodedException.h>

Inheritance diagram for edm::CodedException< Code >:

cms::Exception

List of all members.

Public Types

typedef std::map< Code,
std::string > 
CodeMap

Public Member Functions

Code categoryCode () const
 CodedException (const CodedException &other)
 CodedException (Code category, const std::string &message, const cms::Exception &another)
 CodedException (Code category, const std::string &message)
 CodedException (Code category)
int returnCode () const
virtual ~CodedException () throw ()

Static Public Member Functions

static std::string codeToString (Code)
 -------------- implementation details ------------------

Private Attributes

Code category_


Detailed Description

template<class Code>
class edm::CodedException< Code >

Definition at line 23 of file CodedException.h.


Member Typedef Documentation

template<class Code>
typedef std::map<Code,std::string> edm::CodedException< Code >::CodeMap

Definition at line 45 of file CodedException.h.


Constructor & Destructor Documentation

template<class Code>
edm::CodedException< Code >::CodedException ( Code  category  )  [inline, explicit]

Definition at line 71 of file CodedException.h.

00071                                                     :
00072     cms::Exception(codeToString(aCategory)),
00073     category_(aCategory)
00074   {
00075   }

template<class Code>
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message 
) [inline]

Definition at line 78 of file CodedException.h.

00079                                                                 :
00080     cms::Exception(codeToString(aCategory),message),
00081     category_(aCategory)
00082   {
00083   }

template<class Code>
edm::CodedException< Code >::CodedException ( Code  category,
const std::string &  message,
const cms::Exception another 
) [inline]

Definition at line 86 of file CodedException.h.

00088                                                                    :
00089     cms::Exception(codeToString(aCategory),message,another),
00090     category_(aCategory)
00091   {
00092   }

template<class Code>
edm::CodedException< Code >::CodedException ( const CodedException< Code > &  other  )  [inline]

Definition at line 95 of file CodedException.h.

00095                                                                  :
00096     cms::Exception(other),
00097     category_(other.category_)
00098   {
00099   }

template<class Code>
edm::CodedException< Code >::~CodedException (  )  throw () [inline, virtual]

Definition at line 102 of file CodedException.h.

00103   {
00104   }


Member Function Documentation

template<class Code>
Code edm::CodedException< Code >::categoryCode (  )  const [inline]

Definition at line 39 of file CodedException.h.

References edm::CodedException< Code >::category_.

Referenced by edm::makeInput(), cms::TrackListMerger::produce(), and pat::helper::RefHelper< T >::recursiveLookup().

00039 { return category_; }

template<class Code>
std::string edm::CodedException< Code >::codeToString ( Code  c  )  [inline, static]

-------------- implementation details ------------------

Definition at line 60 of file CodedException.h.

References edm::getCodeTable(), and i.

Referenced by edm::ActionTable::addDefaults().

00061   {
00062     extern void getCodeTable(CodeMap*&);
00063     CodeMap* trans;
00064     getCodeTable(trans);
00065     typename CodeMap::const_iterator i(trans->find(c));
00066     return i!=trans->end() ? i->second : std::string("UnknownCode");
00067   }

template<class Code>
int edm::CodedException< Code >::returnCode (  )  const [inline]

Definition at line 41 of file CodedException.h.

References edm::CodedException< Code >::category_.

00041 { return static_cast<int>(category_); }


Member Data Documentation

template<class Code>
Code edm::CodedException< Code >::category_ [private]

Reimplemented from cms::Exception.

Definition at line 48 of file CodedException.h.

Referenced by edm::CodedException< Code >::categoryCode(), and edm::CodedException< Code >::returnCode().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:39:41 2009 for CMSSW by  doxygen 1.5.4