Skip to content

Category Error Handling Functions

Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › All Categories › Error Handling Functions

Error Handling Functions

Grouped by task. Errors and missing values lists them beside the rest of the area.

Catch runtime errors in a handler

Function What it does From
On Error Sets a label to jump to when a runtime error happens; On Error Goto 0 turns it off. built-in
Local Marks an On Error handler as belonging to the procedure it is set in. built-in

Find out what went wrong

Function What it does From
Err Returns the number of the last runtime error, or sets it without jumping. built-in
Erl Returns the source line of the last runtime error, or 0 if there was none. built-in
Erfn Returns a pointer to the name of the failing procedure; null unless built with -exx. built-in
Ermn Returns a pointer to the name of the source file where the last error happened. built-in

Raise an error yourself

Function What it does From
Error Raises a runtime error by number: jumps to the handler, or ends the program. built-in

Also in this category


Home · Keyword Index

Clone this wiki locally