SFrame 3.6
|
00001 // $Id: SError.cxx 120 2009-08-27 12:02:57Z krasznaa $ 00002 /*************************************************************************** 00003 * @Project: SFrame - ROOT-based analysis framework for ATLAS 00004 * @Package: Core 00005 * 00006 * @author Stefan Ask <Stefan.Ask@cern.ch> - Manchester 00007 * @author David Berge <David.Berge@cern.ch> - CERN 00008 * @author Johannes Haller <Johannes.Haller@cern.ch> - Hamburg 00009 * @author A. Krasznahorkay <Attila.Krasznahorkay@cern.ch> - CERN/Debrecen 00010 * 00011 ***************************************************************************/ 00012 00013 // Local include(s): 00014 #include "../include/SError.h" 00015 00016 using namespace std; 00017 00026 SError::SError( Severity severity ) throw() 00027 : exception(), ostringstream(), m_severity( severity ) { 00028 00029 } 00030 00043 SError::SError( const char* description, Severity severity ) throw() 00044 : exception(), ostringstream(), m_severity( severity ) { 00045 00046 this->str( description ); 00047 00048 } 00049 00057 SError::SError( const SError& parent ) throw() 00058 : std::basic_ios< SError::char_type, SError::traits_type >(), 00059 exception(), 00060 ostringstream(), m_severity( parent.m_severity ) { 00061 00062 this->str( parent.str() ); 00063 00064 } 00065 00069 SError::~SError() throw() { 00070 00071 } 00072 00073 void SError::SetDescription( const char* description ) throw() { 00074 00075 this->str( description ); 00076 return; 00077 00078 } 00079 00080 void SError::SetSeverity( Severity severity ) throw() { 00081 00082 m_severity = severity; 00083 return; 00084 00085 } 00086 00087 const char* SError::what() const throw() { 00088 00089 return this->str().c_str(); 00090 00091 } 00092 00093 SError::Severity SError::request() const throw() { 00094 00095 return m_severity; 00096 00097 }