cpp-utilities/application/failure.h

29 lines
604 B
C
Raw Normal View History

#ifndef APPLICATION_UTILITIES_FAILURE_H
#define APPLICATION_UTILITIES_FAILURE_H
2015-04-22 18:36:40 +02:00
#include "../global.h"
2015-04-22 18:36:40 +02:00
#include <exception>
#include <iosfwd>
2015-04-22 18:36:40 +02:00
#include <string>
namespace ApplicationUtilities {
2017-05-01 03:13:11 +02:00
class CPP_UTILITIES_EXPORT Failure : public std::exception {
2015-04-22 18:36:40 +02:00
public:
Failure();
Failure(const std::string &what);
~Failure() USE_NOTHROW;
virtual const char *what() const USE_NOTHROW;
private:
std::string m_what;
};
CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &o, const Failure &failure);
} // namespace ApplicationUtilities
2015-04-22 18:36:40 +02:00
#endif // APPLICATION_UTILITIES_FAILURE_H