ON ERROR RESUME NEXT |
ON ERROR RESUME NEXT
Resume execution on next statement after an error
Example:
' Global Error handler ON ERROR GOTO _ERROR
SUB Kalle( BYVAL n AS INTEGER ) ON ERROR RESUME NEXT PRINT n;" - Hello, my name is Kalle", ERROR 51 END SUB
FOR i = 1 TO 2 IF i > 0 THEN CALL Kalle( i ) ERROR i PRINT "%WARNING, ";ERRM, ENDIF NEXT i
END
_ERROR: PRINT "%ERROR, ";ERRM, RESUME NEXT
|