User Tools

Site Tools


en:errorcodesconstants

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:errorcodesconstants [2016/01/02 16:36]
renejm
en:errorcodesconstants [2020/02/28 10:46] (current)
Line 1: Line 1:
-===== Error Codes ===== 
- 
-==== Description ==== 
-This is a list of runtime error code numbers returned by the [[lasterror|LastError]] function and text error messages returned by the [[Lasterrormessage|LastErrorMessage]] function. 
  
 == Non Trappable Errors == == Non Trappable Errors ==
 |Error #||Error Description| |Error #||Error Description|
-|-1|ERROR_NOSUCHLABEL|"No such label"+|-1|ERROR_NOSUCHLABEL|No such label %VARNAME%
-|-2|ERROR_NEXTNOFOR|"Next without FOR"+|-2|ERROR_NEXTNOFOR|Next without FOR| 
-|-3|ERROR_NOTARRAY|"Not an array variable"+|-3|ERROR_NOTARRAY|Variable %VARNAME% is not an array| 
-|-4|ERROR_ARGUMENTCOUNT|"Number of arguments passed does not match FUNCTION/SUBROUTINE definition."+|-5|ERROR_ARGUMENTCOUNT|Number of arguments passed does not match FUNCTION/SUBROUTINE definition| 
-|-5|ERROR_MAXRECURSE|Maximum levels of recursion exceeded.+|-6|ERROR_MAXRECURSE|Maximum levels of recursion exceeded| 
-|-6|ERROR_STACKUNDERFLOW||+|-7|ERROR_STACKUNDERFLOW|Stack Underflow Error| 
 +|-8|ERROR_BADCALLFUNCTION|Function was not called correctly| 
 +|-9|ERROR_BADCALLSUBROUTINE|Subroutine was not called correctly|
  
 == Trappable Errors == == Trappable Errors ==
 |Error #||Error Description| |Error #||Error Description|
-|2|ERROR_FOR1|"Illegal FOR -- start number > end number"+|5|ERROR_FILENUMBER|Invalid File Number| 
-|3|ERROR_FOR2|"Illegal FOR -- start number < end number"+|6|ERROR_FILEOPEN|Unable to open file| 
-|5|ERROR_FILENUMBER|"Invalid File Number"+|7|ERROR_FILENOTOPEN|File not open| 
-|6|ERROR_FILEOPEN|"Unable to open file"+|8|ERROR_FILEWRITE|Unable to write to file| 
-|7|ERROR_FILENOTOPEN|"File not open."+|9|ERROR_FILERESET|Unable to reset file| 
-|8|ERROR_FILEWRITE|"Unable to write to file"+|10|ERROR_ARRAYSIZELARGE|Array %VARNAME% dimension too large| 
-|9|ERROR_FILERESET|"Unable to reset file"+|11|ERROR_ARRAYSIZESMALL|Array %VARNAME% dimension too small| 
-|10|ERROR_ARRAYSIZELARGE|"Array dimension too large"+|13|ERROR_VARNOTASSIGNED|Variable %VARNAME% has not been assigned a value
-|11|ERROR_ARRAYSIZESMALL|"Array dimension too small"+|14|ERROR_ARRAYNITEMS|Array %VARNAME% rows must have the same number of items
-|12|ERROR_NOSUCHVARIABLE|"Unknown variable"+|15|ERROR_ARRAYINDEX|Array %VARNAME% index out of bounds| 
-|13|ERROR_VARNOTASSIGNED|| +|17|ERROR_STRSTART|Starting position less than zero| 
-|15|ERROR_ARRAYINDEX|"Array index out of bounds"| +|20|ERROR_RGB|RGB Color values must be in the range of 0 to 255| 
-|16|ERROR_STRNEGLEN|"Substring length less that zero"+|21|ERROR_PUTBITFORMAT|String input to putbit incorrect| 
-|17|ERROR_STRSTART|"Starting position less than zero"| +|23|ERROR_POLYPOINTS|Not enough points in array for poly()/stamp()| 
-|19|ERROR_NONNUMERIC|"Non-numeric value in numeric expression"+|24|ERROR_IMAGEFILE|Unable to load image file| 
-|20|ERROR_RGB|"RGB Color values must be in the range of 0 to 255."+|25|ERROR_SPRITENUMBER|Sprite number out of range| 
-|21|ERROR_PUTBITFORMAT|"String input to putbit incorrect."| +|26|ERROR_SPRITENA|Sprite has not been assigned| 
-|22|ERROR_POLYARRAY|"Argument not an array for poly()/stamp()"+|27|ERROR_SPRITESLICE|Unable to slice image| 
-|23|ERROR_POLYPOINTS|"Not enough points in array for poly()/stamp()"+|28|ERROR_FOLDER|Invalid directory name| 
-|24|ERROR_IMAGEFILE|"Unable to load image file."+|29|ERROR_INFINITY|Operation returned infinity
-|25|ERROR_SPRITENUMBER|"Sprite number out of range."+|30|ERROR_DBOPEN|Unable to open SQLITE database| 
-|26|ERROR_SPRITENA|"Sprite has not been assigned."+|31|ERROR_DBQUERY|Database query error (message follows)| 
-|27|ERROR_SPRITESLICE|"Unable to slice image."+|32|ERROR_DBNOTOPEN|Database must be opened first| 
-|28|ERROR_FOLDER|"Invalid directory name."+|33|ERROR_DBCOLNO|Column number out of range or column name not in data set
-|29|ERROR_INFINITY|| +|34|ERROR_DBNOTSET|Record set must be opened first| 
-|30|ERROR_DBOPEN|"Unable to open SQLITE database."+|35|ERROR_TYPECONV|Unable to convert string to number
-|31|ERROR_DBQUERY|"Database query error (message follows)."+|36|ERROR_NETSOCK|Error opening network socket| 
-|32|ERROR_DBNOTOPEN|"Database must be opened first."+|37|ERROR_NETHOST|Error finding network host| 
-|33|ERROR_DBCOLNO|"Column number out of range."+|38|ERROR_NETCONN|Unable to connect to network host| 
-|34|ERROR_DBNOTSET|"Record set must be opened first."+|39|ERROR_NETREAD|Unable to read from network connection| 
-|35|ERROR_TYPECONV|| +|40|ERROR_NETNONE|Network connection has not been opened| 
-|36|ERROR_NETSOCK|"Error opening network socket."+|41|ERROR_NETWRITE|Unable to write to network connection| 
-|37|ERROR_NETHOST|"Error finding network host."+|42|ERROR_NETSOCKOPT|Unable to set network socket options| 
-|38|ERROR_NETCONN|"Unable to connect to network host."+|43|ERROR_NETBIND|Unable to bind network socket| 
-|39|ERROR_NETREAD|"Unable to read from network connection."+|44|ERROR_NETACCEPT|Unable to accept network connection| 
-|40|ERROR_NETNONE|"Network connection has not been opened."+|45|ERROR_NETSOCKNUMBER|Invalid Socket Number| 
-|41|ERROR_NETWRITE|"Unable to write to network connection."+|46|ERROR_PERMISSION|You do not have permission to use this statement/function| 
-|42|ERROR_NETSOCKOPT|"Unable to set network socket options."+|47|ERROR_IMAGESAVETYPE|Invalid image save type| 
-|43|ERROR_NETBIND|"Unable to bind network socket."+|50|ERROR_DIVZERO|Division by zero| 
-|44|ERROR_NETACCEPT|"Unable to accept network connection."+|51|ERROR_BYREF|Function/Subroutine expecting variable reference in call
-|45|ERROR_NETSOCKNUMBER|"Invalid Socket Number"+|53|ERROR_FREEFILE|There are no free file numbers to allocate
-|46|ERROR_PERMISSION|"You do not have permission to use this statement/function."+|54|ERROR_FREENET|There are no free network connections to allocate
-|47|ERROR_IMAGESAVETYPE|"Invalid image save type."+|55|ERROR_FREEDB|There are no free database connections to allocate
-|50|ERROR_DIVZERO|Division by zero.+|56|ERROR_DBCONNNUMBER|Invalid Database Connection Number
-|51|ERROR_BYREF|+|57|ERROR_FREEDBSET|There are no free data sets to allocate for that database connection
-|52|ERROR_BYREFTYPE|+|58|ERROR_DBSETNUMBER|Invalid data set number
-|53|ERROR_FREEFILE|| +|59|ERROR_DBNOTSETROW|You must advance the data set using DBROW before you can read data from it
-|54|ERROR_FREENET|| +|60|ERROR_PENWIDTH|Drawing pen width must be a non-negative number
-|55|ERROR_FREEDB|| +|62|ERROR_ARRAYINDEXMISSING|Array variable %VARNAME% has no value without an index
-|56|ERROR_DBCONNNUMBER|| +|63|ERROR_IMAGESCALE|Image scale must be greater than or equal to zero
-|57|ERROR_FREEDBSET|| +|64|ERROR_FONTSIZE|Font size, in points, must be greater than or equal to zero
-|58|ERROR_DBSETNUMBER|| +|65|ERROR_FONTWEIGHT|Font weight must be greater than or equal to zero
-|59|ERROR_DBNOTSETROW || +|66|ERROR_RADIXSTRING|Unable to convert radix string back to a decimal number
-|60|ERROR_PENWIDTH|+|67|ERROR_RADIX|Radix conversion base muse be between 2 and 36
-|61|ERROR_COLORNUMBER|+|68|ERROR_LOGRANGE|Unable to calculate the logarithm or root of a negative number
-|62|ERROR_ARRAYINDEXMISSING|| +|69|ERROR_STRINGMAXLEN|String exceeds maximum length of 16,777,216 characters
-|63|ERROR_IMAGESCALE|| +|71|ERROR_PRINTERNOTON|Printer is not on
-|64|ERROR_FONTSIZE|| +|72|ERROR_PRINTERNOTOFF|Printing is already on
-|65|ERROR_FONTWEIGHT|| +|73|ERROR_PRINTEROPEN|Unable to open printer
-|66|ERROR_RADIXSTRING|| +|74|ERROR_WAVFILEFORMAT|Media file does not exist or in an unsupported format
-|67|ERROR_RADIX|| +|75|ERROR_WAVNOTOPEN|Media file not open
-|68|ERROR_LOGRANGE|| +|76|ERROR_WAVNOTSEEKABLE|| 
-|69|ERROR_STRINGMAXLEN|+|77|ERROR_WAVNODURATION|| 
-|70|ERROR_NOTANUMBER|+|78|ERROR_FILEOPERATION|Can not perform that operation on a Serial Port| 
-|71|ERROR_PRINTERNOTON|| +|79|ERROR_SERIALPARAMETER|Invalid serial port parameter| 
-|72|ERROR_PRINTERNOTOFF|| +|80|ERROR_LONGRANGE|Number exceeds long integer range ()| 
-|73|ERROR_PRINTEROPEN|| +|81|ERROR_INTEGERRANGE|Number exceeds integer range ()|
-|74|ERROR_WAVFILEFORMAT|| +
-|75|ERROR_WAVNOTOPEN|| +
-|76|ERROR_WAVNOTSEEKABLE  +
-|77|ERROR_WAVNODURATION  +
-|78|ERROR_FILEOPERATION  +
-|79|ERROR_SERIALPARAMETER +
 |65535|ERROR_NOTIMPLEMENTED|"Feature not implemented in this environment."| |65535|ERROR_NOTIMPLEMENTED|"Feature not implemented in this environment."|
  
 == Warnings == == Warnings ==
 |Error #||Error Description| |Error #||Error Description|
-|65571|WARNING_TYPECONV|| +|65536+ERROR_TYPECONV|WARNING_TYPECONV|Unable to convert string to number, zero used
-|65612|WARNING_WAVNOTSEEKABLE|| +|65536+ERROR_WAVNOTSEEKABLE|WARNING_WAVNOTSEEKABLE|Media file is not seekable
-|65613|WARNING_WAVNODURATION|| +|65536+ERROR_WAVNODURATION|WARNING_WAVNODURATION|Duration is not available for media file
-|65549|WARNING_VARNOTASSIGNED|| +|65536+ERROR_VARNOTASSIGNED|WARNING_VARNOTASSIGNED|Variable %VARNAME% has not been assigned a value
- +|65536+ERROR_LONGRANGE|WARNING_LONGRANGE|Number exceeds long integer range ()| 
-==== Example ==== +|65536+ERROR_INTEGERRANGE|WARNING_INTEGERRANGE|Number exceeds integer range ()|
- +
-<code> +
-# 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 +
-</code> +
-will display\\ +
-<code> +
-+
-trap and run - error on line 4 - error number 4 message Next without FOR () +
-+
-trap and run - error on line 6 - error number 5 message Invalid File Number () +
-Runs Anyway +
-+
-ERROR on line 12: Next without FOR  +
-</code>+
  
-==== See Also ==== 
-{{page>en:start#Error Handling&noheader}} 
  
  
en/errorcodesconstants.1451777818.txt.gz · Last modified: 2020/02/28 10:46 (external edit)