All that has ever been told to me is to go to evil and stay away from them, but I think they can help me here (?). I would like to give the user the opportunity to restart the application when the exception is caught, and I had problems with moving my head around what to do ...
My application will be monitored by another process, but there are some exceptions when I want the user to be able to decide what to do without returning control to the calling process.
Is something like this “acceptable”? Any other suggestions?
Many thanks!
int main(){
initialize:
try{
}
catch(...)
{
cout<<"Would you like to try initializing again?"<<endl;
goto initialize;
abort();
}
return 0;
}
source
share