1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00
QB64-PE/internal/help/_ERRORMESSAGE$__111111111111$.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

46 lines
1.4 KiB
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:08}}
{{DISPLAYTITLE:_ERRORMESSAGE$}}
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.
{{PageSyntax}}
:{{Parameter|e$}} = [[_ERRORMESSAGE$]]
:{{Parameter|e$}} = [[_ERRORMESSAGE$]]({{Parameter|errorCode%}})
{{PageDescription}}
* 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.
{{PageExamples}}
''Example 1:'' Using an error handler that ignores any error.
{{CodeStart}}
{{Cl|ON ERROR}} {{Cl|GOTO}} Errhandler
' Main module program error simulation code
{{Cl|ERROR}} 7 ' simulate an Out of Memory Error
PRINT "Error handled...ending program"
{{Cl|SLEEP}} 4
{{Cl|SYSTEM}} ' end of program code
Errhandler: 'error handler sub program line label
PRINT "Error"; {{Cl|ERR}}; "on program file line"; {{Cl|_ERRORLINE}}
PRINT "Description: "; {{Cl|_ERRORMESSAGE$}}; "."
{{Cl|BEEP}} ' warning beep
{{Cl|RESUME}} NEXT ' moves program to code following the error.
{{CodeEnd}}
{{PageSeeAlso}}
* [[ON ERROR]]
* [[_ERRORLINE]]
* [[_INCLERRORLINE]], [[_INCLERRORFILE$]]
* [[ERR]], [[ERL]]
* [[ERROR]]
* [[ERROR Codes]]
{{PageNavigation}}