Skip to content

ERROR


Error handling statement to force an error to be generated

Syntax

` declare sub Error ( errno as long )

`

Usage

` Error number

`

Parameters

number

The error number to generate

Description

Error invokes the error handler specified with On Error or, in case there was none set, aborts the program, printing an error message similar to those generated by the compiler's -exx run-time error checking. It's possible to use the built-in run-time error numbers and/or other custom error numbers for number. This can be used to simulate custom error numbers.

Examples

To send an error alert of error 150 (just some arbitrary error code) one would do the following:

start GeSHi

Error 150

end GeSHi

Differences from QB

  • Error numbers are not the same as in QB.

See also

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft