NanoStructures  1.0
DMFT solver for layered, strongly correlated nanostructures
exception.h
1 #ifndef EXCEPTION_H
2 #define EXCEPTION_H
3 
4 #include <string>
5 #include <exception>
6 
7 #define ERROR(message) throw error::Exception(message)
8 
9 namespace error {
10 class Exception : public std::exception
11 {
12 public:
13  Exception(std::string message);
14  virtual const char* what() const throw() { return m_message.c_str(); }
15  virtual ~Exception() throw() {}
16 protected:
17  std::string m_message;
18 };
19 }
20 #endif // EXCEPTION_H
Definition: exception.h:10