User Tools

Site Tools


el:errorcodes

Error Codes

Description

This is a list of runtime error code numbers returned by the LastError function and text error messages returned by the LastErrorMessage function.

Error #Error Description
1ERROR_NOSUCHLABEL“No such label”
2ERROR_FOR1“Illegal FOR – start number > end number”
3ERROR_FOR2“Illegal FOR – start number < end number”
4ERROR_NEXTNOFOR“Next without FOR”
5ERROR_FILENUMBER“Invalid File Number”
6ERROR_FILEOPEN“Unable to open file”
7ERROR_FILENOTOPEN“File not open.”
8ERROR_FILEWRITE“Unable to write to file”
9ERROR_FILERESET“Unable to reset file”
10ERROR_ARRAYSIZELARGE“Array dimension too large”
11ERROR_ARRAYSIZESMALL“Array dimension too small”
12ERROR_NOSUCHVARIABLE“Unknown variable”
13ERROR_NOTARRAY“Not an array variable”
14ERROR_NOTSTRINGARRAY“Not a string array variable”
15ERROR_ARRAYINDEX“Array index out of bounds”
16ERROR_STRNEGLEN“Substring length less that zero”
17ERROR_STRSTART“Starting position less than zero”
18ERROR_STREND“String not long enough for given starting character”
19ERROR_NONNUMERIC“Non-numeric value in numeric expression”
20ERROR_RGB“RGB Color values must be in the range of 0 to 255.”
21ERROR_PUTBITFORMAT“String input to putbit incorrect.”
22ERROR_POLYARRAY“Argument not an array for poly()/stamp()“
23ERROR_POLYPOINTS“Not enough points in array for poly()/stamp()“
24ERROR_IMAGEFILE“Unable to load image file.”
25ERROR_SPRITENUMBER“Sprite number out of range.”
26ERROR_SPRITENA“Sprite has not been assigned.”
27ERROR_SPRITESLICE“Unable to slice image.”
28ERROR_FOLDER“Invalid directory name.”
29ERROR_DECIMALMASK“Decimal mask must be in the range of 0 to 15.”
30ERROR_DBOPEN“Unable to open SQLITE database.”
31ERROR_DBQUERY“Database query error (message follows).”
32ERROR_DBNOTOPEN“Database must be opened first.”
33ERROR_DBCOLNO“Column number out of range.”
34ERROR_DBNOTSET“Record set must be opened first.”
35ERROR_EXTOPBAD“Invalid Extended Op-code.”
36ERROR_NETSOCK“Error opening network socket.”
37ERROR_NETHOST“Error finding network host.”
38ERROR_NETCONN“Unable to connect to network host.”
39ERROR_NETREAD“Unable to read from network connection.”
40ERROR_NETNONE“Network connection has not been opened.”
41ERROR_NETWRITE“Unable to write to network connection.”
42ERROR_NETSOCKOPT“Unable to set network socket options.”
43ERROR_NETBIND“Unable to bind network socket.”
44ERROR_NETACCEPT“Unable to accept network connection.”
45ERROR_NETSOCKNUMBER“Invalid Socket Number”
46ERROR_PERMISSION“You do not have permission to use this statement/function.”
47ERROR_IMAGESAVETYPE“Invalid image save type.”
48ERROR_ARGUMENTCOUNT“Number of arguments passed does not match FUNCTION/SUBROUTINE definition.”
49ERROR_MAXRECURSEMaximum levels of recursion exceeded.
50ERROR_DIVZERODivision by zero.
9999ERROR_NOTIMPLEMENTED“Feature not implemented in this environment.”

Example

# test error trapping
onerror nicetrap
print 1
next haha
print 2
open 999, "bogus.file"
print "Runs Anyway"

# test error trapping off and fail at any error (default)
offerror
print 3
next hoho
print "never get here"

end

nicetrap:
# this is the nice error handler
print "trap and run - error on line " + lasterrorline + " - error number " + lasterror + " message " + lasterrormessage + " (" + lasterrorextra + ")"
return

will display

1
trap and run - error on line 4 - error number 4 message Next without FOR ()
2
trap and run - error on line 6 - error number 5 message Invalid File Number ()
Runs Anyway
3
ERROR on line 12: Next without FOR 

See Also

el/errorcodes.txt · Last modified: 2016/01/01 22:39 (external edit)