I have a problem with handling exceptions. It is as below:
I have a class lets say ABC (in ABC.h):
Code:
class ABC {
public:
ABC(const char *name="ME";
) throw (Ex,Exfile);
ABC(const ABC& Y)
throw();
virtual ~ABC();
};
Next I have the constructors defined as:
Code:
ABC::ABC(const char* _name)
throw(Ex,Exfile);
ABC::ABC(const ABC& Y):name()
{
try {Init();
Copy(Y);
}
catch(Ex &)
{ }
}
Further I have Ex structure as:
Code:
struct Ex{ int errornu;
Ex(int erronu);
virtual ~Ex();
};
}
upon compilation of the program I get the following error:
Code:
declaration of `ABC::ABC(const ABC &)' throws different exception.
ABC.h:19: previous declaration here
Can any one help in resoving this error?