Files
core/Common/cppcf/cfexception.h
2022-06-03 20:38:30 +03:00

33 lines
613 B
C++

#pragma once
#include <exception>
#include <string>
namespace CFCPP
{
class CFException : virtual public std::exception
{
public:
CFException() {}
CFException(std::string message) : errorMessage(message) {}
virtual ~CFException() throw () {}
virtual const char* what() const throw () {
return errorMessage.c_str();
}
protected:
std::string errorMessage;
};
class CFFileFormatException : public CFException
{
public:
CFFileFormatException() {}
CFFileFormatException(std::string message) : CFException(message) {}
virtual ~CFFileFormatException() throw () {}
};
}