Is there any way that I can continue input after end of file or invalid input. The record
function will throw an exception if a certain data member is not recorded. I want to catch the exception and use another function rerecord
to enter the information. The program will catch the exception and print the output but it won't do the last part.
int main()
{
info person;
try {
person.record(std::cin);
}
catch(std::domain_error e) {
std::cout << "Re-enter person info" << std::endl;
person.rerecord(std::cin);
}
}