_ERRORMESSAGE$ - mkilgore/QB64pe GitHub Wiki

The _ERRORMESSAGE$ function returns a human-readable description of the most recent runtime error, or the description of an arbitrary error code passed to it.

Syntax

e$ = _ERRORMESSAGE$
e$ = _ERRORMESSAGE$(errorCode%)

Description

  • Used in program error troubleshooting.
  • The message returned is identical to the message shown in the dialog box that appears if your program has no error handler. See ERROR Codes for the full list of error codes and their messages.

Examples

Example 1: Using an error handler that ignores any error.

 Errhandler:              'error handler sub program line label
  PRINT "Error"; ERR; "on program file line"; _ERRORLINE
  PRINT "Description: "; _ERRORMESSAGE$; "."
  BEEP             ' warning beep
 RESUME NEXT       ' moves program to code following the error. '' ''

See also


Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
⚠️ **GitHub.com Fallback** ⚠️