C++ Utilities  4.9.2
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
failure.h
Go to the documentation of this file.
1 #ifndef APPLICATION_UTILITIES_FAILURE_H
2 #define APPLICATION_UTILITIES_FAILURE_H
3 
4 #include "../global.h"
5 
6 #include <exception>
7 #include <string>
8 
9 namespace ApplicationUtilities {
10 
11 class CPP_UTILITIES_EXPORT Failure : public std::exception {
12 public:
13  Failure();
14  Failure(const std::string &what);
16 
17  virtual const char *what() const USE_NOTHROW;
18 
19 private:
20  std::string m_what;
21 };
22 }
23 
24 #endif // APPLICATION_UTILITIES_FAILURE_H
Contains currently only ArgumentParser and related classes.
#define USE_NOTHROW
Marks a function as never throwing, under no circumstances.
Definition: global.h:97
The Failure class is thrown by an ArgumentParser when a parsing error occurs.
Definition: failure.h:11
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.