This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:errorcodesconstants [2016/08/04 09:04] admin |
en:errorcodesconstants [2016/08/15 04:43] admin |
||
---|---|---|---|
Line 92: | Line 92: | ||
|65536+ERROR_WAVNODURATION|WARNING_WAVNODURATION|Duration is not available for media file| | |65536+ERROR_WAVNODURATION|WARNING_WAVNODURATION|Duration is not available for media file| | ||
|65536+ERROR_VARNOTASSIGNED|WARNING_VARNOTASSIGNED|Variable %VARNAME% has not been assigned a value| | |65536+ERROR_VARNOTASSIGNED|WARNING_VARNOTASSIGNED|Variable %VARNAME% has not been assigned a value| | ||
- | |65536+ERROR_LONGRANGE|WARNING_LONGRANGE|Number exceeds long integer range (| | + | |65536+ERROR_LONGRANGE|WARNING_LONGRANGE|Number exceeds long integer range ()| |
- | |65536+ERROR_INTEGERRANGE|WARNING_INTEGERRANGE|Number exceeds integer range (| | + | |65536+ERROR_INTEGERRANGE|WARNING_INTEGERRANGE|Number exceeds integer range ()| |
- | ==== Example ==== | ||
- | < | ||
- | # test error trapping | ||
- | onerror nicetrap | ||
- | print 1 | ||
- | next haha | ||
- | print 2 | ||
- | open 999, " | ||
- | 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 ==== | ||
- | {{page> | ||
- | |||
- | ==== History ==== | ||
- | |1.99.99.9|Corrected and updated list of errorcodes| | ||
- | |1.99.99.53|Corrected and updated list of errorcodes| | ||