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 *****************************************************************************/
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:
98  std::string detailed_message;
99 };
100 
101 }; // namespace ecl
102 
103 #endif /* ECL_DISABLE_EXCEPTIONS */
104 #endif /*ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_*/
#define ecl_exceptions_PUBLIC
Definition: macros.hpp:37
Virtual parent class for the ecl exceptions.
Definition: exception.hpp:49
Standard exception type, provides code location and error string.
const std::string & message() const
Macros and exceptions for try-catch handling within the ecl.
const ErrorFlag & flag() const
Flag enumerating the type of exception thrown.


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