Statements used in run-time errors

You include statements in a script to explicitly manage the flow of control when an error occurs.

  • The Err statement sets the error number and optionally specifies an error message for it.
  • The Error statement creates an error and optionally specifies an error message for it.
  • The On Error statement specifies how to handle an error.
  • The On Error Resume Next specifies that program execution continues with the next statement after the statement that generates the error.