ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcID_Exception.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ZDCID_EXCEPTION_H
6#define ZDCID_EXCEPTION_H
7
8#include <string>
9
15
17public:
18
22 ZdcID_Exception() : m_message("No error message") , m_code( 999 ) { }
23
27 ZdcID_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
59 virtual int code() const { return m_code;}
60
61 //virtual operator std::string() ;
62
66 virtual ~ZdcID_Exception() {}
67
68private:
69
73 std::string m_message;
74
78 int m_code;
79};
80#endif //ZDCID_EXCEPTION_H
81
int m_code
error code
virtual int code() const
return error code
ZdcID_Exception()
default constructor
virtual ~ZdcID_Exception()
destructor
std::string m_message
error message
void code(int l_code)
set error code number
void message(const std::string &l_message)
set error message
ZdcID_Exception(const std::string &l_message, int l_code)
constructor to be used
virtual std::string message() const
return error message