Bonjour
Je suis en train de développer une lib. Et j'aimerais créer un type XMLException (vous devinerez son utilité :)
Je veux qu'il hérite de std::exception.
Voici sa définition :
class XMLException : public std::exception {
public:
XMLException(std::string message);
XMLException(const char *message);
XMLException(char *message);
~XMLException() {};
const char* what () const throw();
private:
const char *msg;
};
La ligne en italique semble poser problème :(
Voici ce que me dit g++ :
XMLException.h:34: error: looser throw specifier for `virtual XMLException::~XMLException()'
(…)
Forum Programmation.c++ Créer une exception
11
jan.
2005