So I am creating an exception using inheritence of "exception" library, but I get an error which says looser throw for 'virtual'.
#include <string>
#include <exception>
#include <sstream>
namespace Vehicle_Renting{
using namespace std;
class Auto_Rent_Exception : public std::exception{
protected:
string error;
public:
Auto_Rent_Exception(){
}
virtual const string what() = 0;
virtual Auto_Rent_Exception* clone() = 0;
};
It says : error: looser throw specifier for 'virtual Vehicle_Renting::Auto_Rent_Exception::~Auto_Rent_Exception()' Vehicle_Renting is namespace of my project.