ATLAS Offline Software
LArID_Exception.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /* Generated by Together */
6 
7 /* date of creation : 12/06/2001 */
8 
9 #ifndef LAROFFLINEID_EXCEPTION_H
10 #define LAROFFLINEID_EXCEPTION_H
11 
12 #include <string>
13 
21 public:
22 
26  LArID_Exception() : m_message("No error message") , m_code( 999 ) { }
27 
31  LArID_Exception(const std::string& l_message , int l_code) : m_message ( l_message ) , m_code ( l_code ) { }
32 
36  void message(const std::string& l_message) { m_message = l_message ;}
37 
41  const std::string& message() const { return m_message;}
42 
46  void code(int l_code) { m_code = l_code ;}
47 
61  int code() const { return m_code;}
62 
63  operator std::string() const;
64 
65 
66 private:
67 
71  std::string m_message;
72 
76  int m_code;
77 };
78 #endif //LAROFFLINEID_EXCEPTION_H
79 
LArID_Exception::code
void code(int l_code)
set error code number
Definition: LArID_Exception.h:46
LArID_Exception::message
const std::string & message() const
return error message
Definition: LArID_Exception.h:41
LArID_Exception::LArID_Exception
LArID_Exception(const std::string &l_message, int l_code)
constructor to be used
Definition: LArID_Exception.h:31
LArID_Exception::code
int code() const
return error code
Definition: LArID_Exception.h:61
LArID_Exception::m_message
std::string m_message
error message
Definition: LArID_Exception.h:71
LArID_Exception::m_code
int m_code
error code
Definition: LArID_Exception.h:76
LArID_Exception::message
void message(const std::string &l_message)
set error message
Definition: LArID_Exception.h:36
LArID_Exception::LArID_Exception
LArID_Exception()
default constructor
Definition: LArID_Exception.h:26
LArID_Exception
Exception class for LAr Identifiers.
Definition: LArID_Exception.h:20