exception.hpp
Go to the documentation of this file.
1 
10 /*****************************************************************************
11 ** Ifdefs
12 *****************************************************************************/
13 
14 #ifndef ECL_EXCEPTIONS_EXCEPTION_HPP_
15 #define ECL_EXCEPTIONS_EXCEPTION_HPP_
16 
17 /*****************************************************************************
18 ** Disable check
19 *****************************************************************************/
20 
21 #include <ecl/config/ecl.hpp>
22 #ifndef ECL_DISABLE_EXCEPTIONS
23 
24 /*****************************************************************************
25 ** Includes
26 *****************************************************************************/
27 
28 #include <exception>
29 #include <string>
30 #include "macros.hpp"
31 
32 /*****************************************************************************
33 ** Namespaces
34 *****************************************************************************/
35 
36 namespace ecl {
37 
38 /*****************************************************************************
39 ** General exception
40 *****************************************************************************/
49 class ecl_exceptions_PUBLIC Exception : public std::exception
50 {
51  public:
55  virtual const char * what() const throw() = 0;
56  virtual ~Exception() throw() {}
58  protected:
63  Exception() {}
68  Exception(const char* loc ) : location(loc) {};
69 
70  std::string location;
71 };
72 
73 }; // namespace ecl
74 
75 #endif /* ECL_DISABLE_EXCEPTIONS */
76 #endif /*ECL_EXCEPTIONS_EXCEPTION_HPP_*/
#define ecl_exceptions_PUBLIC
Definition: macros.hpp:37
virtual ~Exception()
Definition: exception.hpp:56
Virtual parent class for the ecl exceptions.
Definition: exception.hpp:49
Macros for ecl exception handling.
std::string location
Definition: exception.hpp:68


ecl_exceptions
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:12