EResume Statement

Resumes execution after an error-handling routine is finished.

Syntax
EResume [ {label | Next }​ ]

Description

  • EResume

    If the error occurred in the same procedure as the error handler, execution resumes with the statement that caused the error.

    If the error occurred in a called procedure, execution resumes at the Call statement in the procedure containing the error handler.

  • EResume Next

    If the error occurred in the same procedure as the error handler, execution resumes with the statement immediately following the statement that caused the error.

    If the error occurred in a called procedure, execution resumes with the statement immediately following the Call statement that last in the procedure containing the error handler.

  • EResume {label}​

    If the error occurred in the same procedure as the error handler, execution resumes at the statement containing the label.

See Also
OnErr

EResume Statement Example

Function main
  Integer retry

  OnErr GoTo eHandler
  Do
    RunCycle
  Loop
  Exit Function

eHandler:
  Select Err
    Case MyError
      retry = retry + 1
      If retry < 3 Then
        EResume ' try again
      Else
        Print "MyError has occurred ", retry, " times
      EndIf
  Send
Fend