Purpose |
Restart program execution after error handling with ON ERROR GOTO. |
Syntax |
RESUME RESUME NEXT RESUME FLUSH RESUME <Label> |
Remarks |
The RESUME statement is used to continue execution of a program after a run-time error has been trapped and processed with an ON ERROR handler. RESUME (in any form) tells PowerBASIC that error processing has been completed, and it is now time to continue normal execution of the programming. Whenever an error is trapped and processed by ON ERROR GOTO, execution of a matching RESUME is mandatory. RESUME If the first form of RESUME is used (without any modifier), the statement which generated the error is executed again and program flow continues normally. Be certain that you've corrected the condition which generated the error in the first place before you do this! RESUME NEXT If you execute RESUME NEXT, program execution continues on the line immediately following the one which generated the error. Program flow continues normally after that. Be certain that your error handler did whatever was necessary to substitute new actions to replace what was expected from the code which errored. RESUME FLUSH If you execute RESUME FLUSH, there is no transfer of control to a different line. Program execution simply continues on the line immediately following the RESUME FLUSH. RESUME <Label> If a label is specified, program execution continues at the specified label location. The label must be "local"; that is, it must be located within the same procedure as the RESUME. |
Restrictions |
ON ERROR and RESUME may not be used within a TRY/END TRY block or a FASTPROC procedure. |
See also |
ERL, ERR, ERROR, Error Overview, ERROR$, Error Trapping, ON ERROR |
Example |
See the examples in Error Trapping. |