O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Resume Statement

Syntax

Resume [0]
Resume Next 
Resume label

Description

Used to continue program execution when an error-handling routine is complete

Rules at a Glance

Resume can take any of the forms shown in the following table:

Statement

Description

Resume

If the error-handling routine is in the same procedure as the statement that caused the error, program execution continues with the statement that caused the error.

If the error occurred in an external procedure called by the procedure containing the error handler, program execution continues with the statement in the procedure containing the error handler that last called the external procedure.

Resume Next

If the error-handling routine is in the same procedure as the statement that caused the error, program execution continues with the statement following the statement that caused the error.

If the error occurred in an external procedure called by the procedure containing the error handler, program execution continues with the statement containing the error handler immediately following the statement that last called the external procedure.

Resume label

label must be in the same procedure as the error handler.

Program execution continues at the specified label.

Programming Tips and Gotchas

  • You can only use the Resume statement in an error-handling routine; otherwise, a runtime error will be generated.

  • An error-handling routine does not necessarily have to contain a Resume statement. If the error-handling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required