home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / INCLUDE / ERROR.PRE < prev    next >
Encoding:
Text File  |  1990-03-26  |  9.5 KB  |  261 lines

  1. /***************************************************************************
  2.  
  3.                Turbo Prolog
  4.  
  5.                          Error Number definition
  6.  
  7.  FileName: ERROR.H
  8.  PURPOSE: Make defines for errors in the Prolog system
  9.  
  10.  ═══════════════╦══════╦════════════════════════════════════════════════════
  11.   Date Modified,║ By,  ║  Comments.
  12.  ═══════════════╬══════╬════════════════════════════════════════════════════
  13.                 ║      ║
  14. ***************************************************************************/
  15.  
  16.  
  17. /***************************************************************************
  18.  
  19.     Error code conventions
  20.     ======================
  21.  
  22. 0 - 1000 Compiler errors
  23. 100X  MEM error's
  24. 101X  Stack errors
  25. 102X  Trail errors
  26. 103X  Arithmetic
  27. 104X  Free variables
  28. 11XX  File IO & Operating system
  29. 12XX  Screen & Window
  30. 13XX  Ext db
  31. 14XX  Term reader
  32. 15XX  Editor
  33. 16XX  String handling
  34. 17XX  BGI
  35. 18XX  MSG module
  36. 19XX  Directory browser
  37. 20XX  Configuuration loading
  38. 21XX  OS/2 Dialog manager
  39.  
  40. ***************************************************************************/
  41.  
  42. CONSTANTS
  43.   dos_error_offset =     7000
  44.   bgi_error_offset =     1700
  45.   os2_error_offset =     7000
  46.  
  47.  
  48. /***************************************************************************
  49.         Invariant error
  50. ***************************************************************************/
  51.  
  52.   err_invar =             999
  53.  
  54. /***************************************************************************
  55.         MEM-related errors
  56. ***************************************************************************/
  57.  
  58.   err_gstackoverflow =   1001
  59.   err_heapoverflow =     1002
  60.   err_heaptoobig =       1003 /* Requested block is too big (max 0xFFF0 bytes). */
  61.   err_heapbadsize =      1004 /* Mismatch between freed blocks size and what user thinks it is. */
  62.   err_heapfreeblock =    1005 /* Attemp to release already released block. */
  63.   err_heapbadsignature = 1006
  64.   err_convterm =         1007
  65.   err_meminitfailure =   1008
  66.   err_stackoverflow =    1010
  67.   err_trailoverflow =    1020
  68.  
  69.  
  70. /***************************************************************************
  71.         Arithmetic errors
  72. NEGZERO: Negative values or 0 cannot be arguments to 'log' or 'ln'.
  73. NEG: Negative values cannot be arguments to 'sqrt'.
  74.  
  75. Note that the values for NEG & NEGZERO are assembled constants in pfpfns.asm,
  76. where they're included from error.mac. They're only defined here for
  77. completeness.
  78. ***************************************************************************/
  79.  
  80.   err_realoverflow =     1030
  81.   err_integeroverflow =  1031
  82.   err_divzero =          1032
  83.   err_negzero =          1033
  84.   err_neg =              1034
  85.  
  86.  
  87. /***************************************************************************
  88.         Free variables are not alloved here ...
  89. ***************************************************************************/
  90.  
  91.   err_freevariable =     1040
  92.  
  93. /***************************************************************************
  94.         Errors for IO & OS module
  95. ***************************************************************************/
  96.  
  97.   err_alreadyopen =      1101    /* File already open */
  98.   err_inpdev =           1102    /* Wrong mode in input device */
  99.   err_outpdev =          1103    /* Wrong mode in output device */
  100.   err_notopen =          1104    /* The file is not open */
  101.   err_filemode =         1105    /* Bad value in filemode pred */
  102.   err_invdevicemode =    1106    /* Invalid operation on device */
  103.   err_eof =              1107    /* Wrong filemode for eof predicate */
  104.   err_invalid_disk =     1108    /* Invalid disk */
  105.   err_formatlen =        1109    /* Wrong number of arguments for format */
  106.   err_filetoobig =       1110    /* File too big, or not enough memory */
  107.   err_readlen =          1111    /* Wrong number of bytes read */
  108.   err_writelen =         1112    /* Wrong number of bytes written */
  109.   err_invalid_date =     1113    /* Wrong date */
  110.   err_invalid_time =     1114    /* Wrong time */
  111.   err_unrdch =           1115    /* Keyboard buffer full */
  112.   err_systemnotfound =   1116    /* File not found */
  113.   err_execextprog =      1117    /* Error in executing system pred */
  114.   err_portaccess =       1118    /* Ports busy (OS/2 only). */
  115.   err_osversion =        1133    /* Wrong version of operating sys */
  116.  
  117. /***************************************************************************
  118.         Error codes for SCR & WD module
  119. ***************************************************************************/
  120.  
  121.   err_window_parms =     1201        /* Bad window arguments */
  122.   err_bad_cursor =       1202        /* Bad cursor position */
  123.   err_unknown_window =   1203        /* Window does not exist */
  124.   err_too_many_wind =    1205        /* Maximum number of wind */
  125.   err_resize =           1206        /* Bad args in resize */
  126.   err_textmode_run =     1207        /* Wrong screenmode for scroll */
  127.   err_badtextmode =      1208        /* Bad argumentsfor textmode */
  128.   err_removewd =         1209        /* Bad operation on syswind */
  129.   err_syswindow =        1210        /* Illegal operation on sys wind. */
  130.   err_already_compress = 1211
  131.   err_already_expand =   1212
  132.  
  133.  
  134. /***************************************************************************
  135.         Errors for DB module
  136. ***************************************************************************/
  137.  
  138.   err_above_overflow =  1301
  139.   err_already_open =    1302
  140.   err_invaliddatabase = 1303
  141.   err_not_open =        1304
  142.   err_index_notopen =   1305
  143.   err_index_exist =     1306
  144.   err_dbasename_exist = 1308
  145.   err_cant_reopen =     1309
  146.   err_invalid_order =   1310
  147.   err_invalid_keylen =  1311
  148.   err_type_conflict =   1313
  149.   err_cant_create =     1314
  150.   err_cant_open =       1315
  151.   err_no_ems =          1316
  152.   err_marked_invalid =  1317
  153.   err_cant_delete =     1318
  154.   err_invalid_ref =     1319
  155.   err_chain_not_exist = 1320
  156.   err_index_not_exist = 1321
  157.   err_invalid_index =   1322
  158.   err_index_open =      1323
  159.   err_key_not_found =   1324
  160.   err_term_too_big =    1325
  161.   err_invalid_version = 1326
  162.   err_not_begin =       1327
  163.   err_incomp_modes =    1328
  164.   err_insidetransact =  1330
  165.   err_notwritetrans =   1331
  166.   err_transtimeout =    1332
  167.  
  168.  
  169. /***************************************************************************
  170.         Errors in term reader
  171. ***************************************************************************/
  172.  
  173.   err_intgexpect =       1401 /* Integer expected. */
  174.   err_realexpect =       1402 /* Real number expected. */
  175.   err_dquoteexpect =     1403 /* Double quote expected. */
  176.   err_squoteexpect =     1404 /* Single quote expected. */
  177.   err_listexpect =       1405 /* List start expected. */
  178.   err_endlistexpect =    1406 /* End of list expected. */
  179.   err_functorunknown =   1407 /* Functor not found in domain. */
  180.   err_bracketexpect =    1408 /* '(' expected. */
  181.   err_commaorbexpect =   1409 /* ',' or ')' expected. */
  182.  
  183.  
  184. /***************************************************************************
  185.         Error for editor
  186. ***************************************************************************/
  187.  
  188.   err_tekstfull =        1501
  189.  
  190.  
  191. /***************************************************************************
  192.         Error codes for PSTR (Prolog STRing handling) module
  193. ***************************************************************************/
  194.  
  195.   err_string_index =     1601
  196.   err_string_too_long =  1602
  197.  
  198.  
  199. /***************************************************************************
  200.         Error codes for BGI module
  201. ***************************************************************************/
  202.  
  203.   err_bginotinstall =     1701
  204.   err_bginographware =    1702
  205.   err_bgidrivernotfound = 1703
  206.   err_bgiinvdriv =        1704
  207.   err_bgimemdriv =        1705
  208.   err_bgimemscan =        1706
  209.   err_bgimemfill =        1707
  210.   err_bgifontnotfound =   1708
  211.   err_bgimemfont =        1709
  212.   err_bgiinvgrmode =      1710
  213.   err_bgigrapherr =       1711
  214.   err_bgiioerr =          1712
  215.   err_bgiinvfont =        1713
  216.   err_bgiinvfontnum =     1714
  217.   err_bgiinvdevnum =      1715
  218.   err_wrong_pattern_len = 1750
  219.  
  220. /***************************************************************************
  221.         Errors for MSG module
  222. ***************************************************************************/
  223.  
  224.   err_noqelems =         1801
  225.   err_pipeclosed =       1802
  226.   err_pipebroken =       1803
  227.   err_cannotopenpipe =   1804
  228.   err_invpipename =      1805
  229.  
  230. /***************************************************************************
  231.         Error for dir browser
  232. ***************************************************************************/
  233.  
  234.   err_toomanyfiles =     1901
  235.  
  236.  
  237. /***************************************************************************
  238.         Error codes for reading / writing of configuration file
  239. ***************************************************************************/
  240.  
  241.   err_wrong_config_file = 2001
  242.   err_read_config_file =  2002
  243.  
  244.  
  245. /***************************************************************************
  246.         Error codes for OS/2 Dialog Manager
  247. ***************************************************************************/
  248.  
  249.   err_no_value =         2101
  250.   err_wrong_type =       2102
  251.   err_index_too_big =    2103
  252.  
  253.  
  254. /***************************************************************************
  255.         Special exit codes in UI
  256. ***************************************************************************/
  257.  
  258.   exit_uireboot =        30001
  259.   pass_recompile =       30002
  260.   pass_exittrace =       30003
  261.