ON_ERROR - source-solutions/HELP GitHub Wiki
ON ERROR GOTO {line_number|0}
Turns error trapping on or off. When line_number
is set, any error causes the
error handling routine starting at that line number to be called; no message is printed and program execution is not stopped. The error handling routine is
ended by a RESUME
statement. While in an error handling routine, events are paused and error trapping is disabled. After the RESUME
statement, any triggered
events are picked up in the following order: KEY
, TIMER
, PLAY
- the order of the
others is unknown. Unlike event trapping, error trapping remains active when no program is running. ON ERROR CONT
turns off error trapping.
line_number
is an existing line number in the program.
It is not possible to start the error handler at line number 0
.
line_number
does not exist: Undefined line number.