Hello. I can not solve this problem for a while. I would be glad for some advice.
When I try to throw an exception (self created one in Java style)
throw Exception ();
compiler make a protest:
DataTypes/Date.cpp:24: error: no matching function for call to `Exception::Exception(Exception)' DataTypes/Date.cpp:24: error: in thrown expression
It does not work with any of the constructors I have. What is the problem? Here is header file of the Exception:
class Exception
{
public:
Exception(void);
explicit Exception(const char *);
explicit Exception(const Exception &);
Exception(const char *, const Exception &);
virtual ~Exception();
const char * message;
const Exception & cause;
};
I should mention that when I leave just implicit constructor and the second one it works.
Thank you for any help.