HerdSoftware  0.4.0
Exception.h
Go to the documentation of this file.
1 /*
2  * Exception.h
3  *
4  * Created on: 9 Sep 2020
5  * Author: Nicola Mori
6  */
7 
8 #ifndef HERD_EXCEPTION_H_
9 #define HERD_EXCEPTION_H_
10 
11 #include <stdexcept>
12 #include <string>
13 
14 namespace Herd {
15 
24 class Exception : public std::exception {
25 public:
30  Exception(std::string msg = "") : m_what(std::move(msg)) {}
31 
36  [[nodiscard]] const char *what() const noexcept override { return m_what.c_str(); }
37 
38 private:
39  std::string m_what;
40 };
41 
42 } // namespace Herd
43 
44 #endif /* HERD_EXCEPTION_H_ */
Herd::Exception::Exception
Exception(std::string msg="")
Definition: Exception.h:30
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::Exception::m_what
std::string m_what
Definition: Exception.h:39
Herd::Exception
Definition: Exception.h:24
Herd::Exception::what
const char * what() const noexcept override
The error message.
Definition: Exception.h:36