ATLAS Offline Software
Loading...
Searching...
No Matches
CaloID_Exception.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
10
12m_message("No error message") , m_code( 999 )
13{ }
14
15CaloID_Exception::CaloID_Exception(const std::string& lMessage , int lCode) :
16m_message ( lMessage ) , m_code ( lCode )
17{ }
18
19void CaloID_Exception::message(const std::string& lMessage)
20{ m_message = lMessage ;}
21
22const std::string& CaloID_Exception::message() const
23{ return m_message;}
24
25void CaloID_Exception::code(int lCode)
26{ m_code = lCode ;}
27
29{ return m_code;}
30
31CaloID_Exception::operator std::string () const
32
33{
34 return
35 strformat ("CaloID_Exception - Error code: %d \n ", this->code()) +
36 this->message();
37}
38
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition StrFormat.cxx:49
Provide helper functions to create formatted strings.
const std::string & message() const
return error message
int code() const
return error code
CaloID_Exception()
default constructor
void code(int lCode)
set error code number
int m_code
error code
std::string m_message
error message
void message(const std::string &lMessage)
set error message
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition StrFormat.cxx:49