Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CustomException.hpp
Go to the documentation of this file.
1 /*
2  * CustomException.hpp
3  *
4  * Created on: Nov 10, 2014
5  * Author: nano
6  */
7 
8 #ifndef CUSTOMEXCEPTION_HPP_
9 #define CUSTOMEXCEPTION_HPP_
10 
11 // exception.cpp by Bill Weinman <http://bw.org/>
12 #include <iostream>
13 #include <exception>
14 #include "../utils/Logger.hpp"
15 #include "../utils/Formatter.hpp"
16 
17 namespace phoxonics {
18 namespace common {
19 
20 class CustomException : public std::exception {
21 public:
22  explicit CustomException(std::string function, int line, std::string message);
23  virtual ~CustomException() throw();
24  const char * what() const throw();
25 
26 private:
27  std::string function_ { "" };
28  std::string line_ { "" };
29  std::string message_ { "" };
30  std::string what_ { "" };
31 
32  Logger log_;
33  typedef Formatter fmt_;
34 };
35 
36 } /* namespace common */
37 } /* namespace phoxonics */
38 
39 #endif /* CUSTOMEXCEPTION_HPP_ */
Definition: CommonBase.hpp:14
CustomException(std::string function, int line, std::string message)
Definition: CustomException.cpp:13
const char * what() const
Definition: CustomException.cpp:22
virtual ~CustomException()
Definition: CustomException.cpp:26
Definition: CustomException.hpp:20
Definition: Logger.hpp:23
Definition: Formatter.hpp:18