ERROR_NUMBER

ERROR_NUMBER

RETURNS THE ERROR NUMBER

  • Type: System Variable
  • Parameter: 0
  • Group: Reference

ACTION

The system variable ERROR_NUMBER returns the error number, if an error occurs and if the command ON_ERROR_GOTO has been executed.

If no command ON_ERROR_GOTO has been executed or if no error occured, its value is 0.

If an error occured and if the command ON_ERROR_GOTO has been executed, ERROR_NUMBER contains the code of the happened error.

SYNTAX: ERROR_NUMBER in an expression

USE

  • The system variable ERROR_NUMBER is used to know the code of happened error.

ERROR

  • None.

EXAMPLE

label err

on_error_goto err

top 0, 3+:rem here error

print "never printed"

err:

print "error"

print error_number

print error_type$

print error_line

SEE ALSO

ON_ERROR_GOTO

ERROR_ENGLISH

ERROR_FRENCH

ERROR_LINE

ERROR_TYPE$