ATLAS Offline Software
Loading...
Searching...
No Matches
CaloID_Exception.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include <format>
7
8
10m_message("No error message") , m_code( 999 )
11{ }
12
13CaloID_Exception::CaloID_Exception(const std::string& lMessage , int lCode) :
14m_message ( lMessage ) , m_code ( lCode )
15{ }
16
17void CaloID_Exception::message(const std::string& lMessage)
18{ m_message = lMessage ;}
19
20const std::string& CaloID_Exception::message() const
21{ return m_message;}
22
23void CaloID_Exception::code(int lCode)
24{ m_code = lCode ;}
25
27{ return m_code;}
28
29CaloID_Exception::operator std::string () const
30
31{
32 return
33 std::format ("CaloID_Exception - Error code: {} \n{} ", this->code(),
34 this->message());
35}
36
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