Resuming errors

Oct 16, 2008 at 4:43am
I want to resume errors in C++ as we do in Visual Basic
We write at the top of the code 'On Error Resume Next' and if there is any error in the whole program in run-time the error is resumed. similarly i want to do this in c++. Is there any way?

I will appreciate a good solution
Oct 16, 2008 at 11:30am
C++ has exception handling to deal with unforseen errors, see http://www.cplusplus.com/doc/tutorial/exceptions.html for some details on it.
As far as I know there is no direct equivelent of 'On Error Resume Next' (which, btw, Microsoft now advise against using in VB) which tries to just ignore the problem - which can be a very dangerous thing to do in C++!
Well designed exception handling allows you to deal with the majority of errors that occur such that your program continues in a safe manner.
Oct 16, 2008 at 10:50pm
"on error resume next" is a terrible thing. It's merely a hack intended to get around bugs in the language and underlying framework.

Learn to deal with errors correctly.
Topic archived. No new replies allowed.