ATLAS Offline Software
Loading...
Searching...
No Matches
LArOnlID_Exception.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARHARDWAREID_EXCEPTION_H
6#define LARHARDWAREID_EXCEPTION_H
7
8#include <string>
9
17public:
18
22 LArOnlID_Exception() : m_message("No error message") , m_code( 999 ) { }
23
27 LArOnlID_Exception(const std::string& l_message , int l_code) : m_message ( l_message ) , m_code ( l_code ) { }
28
32 void message(const std::string& l_message) { m_message = l_message ;}
33
37 virtual std::string message() const { return m_message;}
38
42 void code(int l_code) { m_code = l_code ;}
43
57 virtual int code() const { return m_code;}
58
59 virtual operator std::string();
60
65
66private:
67
71 std::string m_message;
72
76 int m_code;
77};
78#endif //LARHARDWAREID_EXCEPTION_H
79
80
virtual std::string message() const
return error message
void code(int l_code)
set error code number
void message(const std::string &l_message)
set error message
std::string m_message
error message
LArOnlID_Exception()
default constructor
LArOnlID_Exception(const std::string &l_message, int l_code)
constructor to be used
virtual ~LArOnlID_Exception()
destructor
virtual int code() const
return error code