ERROR ===== Function -------- **ERROR** simulates a Basic error with the advantage that it allows user defined codes. For a list of Basic error messages, see :doc:`../basic-programming/errors-and-warnings`. Syntax ------ ERROR n where 0b THEN ERROR 156 40 GOTO 10 100 IF ERR = 156 THEN PRINT "a>b error" 110 RESUME 10 Remarks ------- The ERROR statement neatly traps errors and forces the printing of a Basic error message. If the error number is undefined in Basic, then processing can be forced to restart at another line to print a user defined message. When ERROR is set to n, this number may be recovered with :doc:`ERR `, and the line number with :doc:`ERL `. After a forced user error trap, a suitable :doc:`resume` command must be executed to ensure correct program operation.