CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondCore/ORA/src/Exception.cc

Go to the documentation of this file.
00001 #include "CondCore/ORA/interface/Exception.h"
00002 #include "ClassUtils.h"
00003 
00004 ora::Exception::Exception( const std::string& message,
00005                            const std::string& methodName ):
00006   cms::Exception( message+" from "+methodName )
00007 {}
00008 
00009 namespace ora {
00010   void throwException( const std::string& message,
00011                        const std::string& methodName ){
00012     throw Exception( message, methodName );
00013   }
00014 
00015   void throwException( const std::string& message,
00016                        const std::type_info& sourceType,
00017                        const std::string& methodName ){
00018     std::string className = ClassUtils::demangledName( sourceType );
00019     throw Exception( message, className+"::"+methodName );
00020   }
00021   
00022 }
00023