standard_exception.hpp
Go to the documentation of this file.
1 
11 /*****************************************************************************
12 ** Ifdefs
13 *****************************************************************************/
14 
15 #ifndef ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_
16 #define ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_
17 
18 /*****************************************************************************
19 ** Disable check
20 *****************************************************************************/
21 
22 #include <ecl/config/ecl.hpp>
23 #ifndef ECL_DISABLE_EXCEPTIONS
24 
25 /*****************************************************************************
26 ** Includes
27 *****************************************************************************/
28 
29 #include <string>
30 #include "exception.hpp"
31 #include <ecl/errors/handlers.hpp>
32 #include <ecl/errors/macros.hpp>
33 #include <cstring>
34 
35 /*****************************************************************************
36 ** Namespaces
37 *****************************************************************************/
38 
39 namespace ecl {
40 
41 /*****************************************************************************
42 ** Interface [StandardException]
43 *****************************************************************************/
54 class ecl_exceptions_PUBLIC StandardException : public Exception
55 {
56  public:
62  StandardException(const char* loc, ErrorFlag error );
69  StandardException(const char* loc, ErrorFlag error, const std::string &msg );
76  StandardException(const char* loc, const StandardException &e );
77 
78  virtual ~StandardException() throw() {}
79 
85  const char* what() const throw();
86 
92  const std::string& message() const { return detailed_message; };
93 
94  const ErrorFlag& flag() const { return error_flag; }
96  private:
97  const ErrorFlag error_flag;
98  std::string detailed_message;
99 };
100 
101 }; // namespace ecl
102 
103 #endif /* ECL_DISABLE_EXCEPTIONS */
104 #endif /*ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_*/
ecl::ErrorFlag
ErrorFlag
ecl_exceptions_PUBLIC
#define ecl_exceptions_PUBLIC
Definition: macros.hpp:37
ecl::StandardException
Standard exception type, provides code location and error string.
Definition: standard_exception.hpp:62
handlers.hpp
exception.hpp
Macros and exceptions for try-catch handling within the ecl.
macros.hpp
ecl


ecl_exceptions
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:04