Debian Codegraph @

terps/tads/tads3/vmerrnum.h

raw symbols SCIP
1 /* $Header: d:/cvsroot/tads/tads3/VMERRNUM.H,v 1.3 1999/07/11 00:46:58 MJRoberts Exp $ */
2
3 /*
4 * Copyright (c) 1998, 2002 Michael J. Roberts. All Rights Reserved.
5 *
6 * Please see the accompanying license file, LICENSE.TXT, for information
7 * on using and copying this software.
8 */
9 /*
10 Name
11 vmerrnum.h - VM error numbers
12 Function
13
14 Notes
15 VM Error Numbers are in the range 1 to 9999.
16 Modified
17 10/28/98 MJRoberts - Creation
18 */
19
20 #ifndef VMERRNUM_H
21 #define VMERRNUM_H
22
23
24 /* ------------------------------------------------------------------------ */
25 /*
26 * File errors
27 */
28
29 /* error reading file */
30 #define VMERR_READ_FILE 101
31
32 /* error writing file */
33 #define VMERR_WRITE_FILE 102
34
35 /* file not found */
36 #define VMERR_FILE_NOT_FOUND 103
37
38 /* error creating file */
39 #define VMERR_CREATE_FILE 104
40
41 /* error closing/committing file */
42 #define VMERR_CLOSE_FILE 105
43
44 /* error deleting file */
45 #define VMERR_DELETE_FILE 106
46
47 /* data packer parsing error at format string index %d */
48 #define VMERR_PACK_PARSE 107
49
50 /* data packer argument mismatch at format string index %d */
51 #define VMERR_PACK_ARG_MISMATCH 108
52
53 /* data packer argument count mismatch at format string index %d */
54 #define VMERR_PACK_ARGC_MISMATCH 109
55
56 /* operation not supported for network server files */
57 #define VMERR_NET_FILE_NOIMPL 110
58
59 /* error renaming file */
60 #define VMERR_RENAME_FILE 111
61
62
63 /* ------------------------------------------------------------------------ */
64 /*
65 * Memory manager errors
66 */
67
68 /*
69 * requested object ID is already allocated to another object (this
70 * generally indicates that an image file or a saved state file contains
71 * invalid data)
72 */
73 #define VMERR_OBJ_IN_USE 201
74
75 /* out of memory */
76 #define VMERR_OUT_OF_MEMORY 202
77
78 /* out of memory allocating pool page (use a smaller in-memory cache) */
79 #define VMERR_NO_MEM_FOR_PAGE 203
80
81 /* invalid page size - must be a power of two */
82 #define VMERR_BAD_POOL_PAGE_SIZE 204
83
84 /* no more property ID's */
85 #define VMERR_OUT_OF_PROPIDS 205
86
87 /* circular initialization dependency in intrinsic class (internal error) */
88 #define VMERR_CIRCULAR_INIT 206
89
90
91 /* ------------------------------------------------------------------------ */
92 /*
93 * Image file errors
94 */
95
96 /*
97 * Unsupported metaclass -- the image file requires a metaclass that
98 * this VM implementation does not provide. This may indicate a version
99 * mismatch (a newer version of the VM is required), or that the image
100 * file is designed for a different host application environment.
101 */
102 #define VMERR_UNKNOWN_METACLASS 301
103
104 /*
105 * Unsupported function set "%s" -- the image file requires a function
106 * set that this VM implementation does not provide. This may indicate
107 * a version mismatch (a newer version of the VM is required), or that
108 * the image file is designed for a different host application
109 * environment.
110 */
111 #define VMERR_UNKNOWN_FUNC_SET 302
112
113 /* attempted to read past end of image file */
114 #define VMERR_READ_PAST_IMG_END 303
115
116 /* not an image file (invalid signature) */
117 #define VMERR_NOT_AN_IMAGE_FILE 304
118
119 /* unrecognized block type in image file */
120 #define VMERR_UNKNOWN_IMAGE_BLOCK 305
121
122 /* data block too small (does not contain required data) */
123 #define VMERR_IMAGE_BLOCK_TOO_SMALL 306
124
125 /* ill-formed image file: pool page before pool definition */
126 #define VMERR_IMAGE_POOL_BEFORE_DEF 307
127
128 /* ill-formed image file: pool page out of range of definition */
129 #define VMERR_IMAGE_POOL_BAD_PAGE 308
130
131 /* invalid pool ID in image file */
132 #define VMERR_IMAGE_BAD_POOL_ID 309
133
134 /* attempted to load a pool page at an invalid offset */
135 #define VMERR_LOAD_BAD_PAGE_IDX 310
136
137 /* attempted to load a pool page that hasn't been defined in the image */
138 #define VMERR_LOAD_UNDEF_PAGE 311
139
140 /* ill-formed image file: pool is defined more than once */
141 #define VMERR_IMAGE_POOL_REDEF 312
142
143 /* file contains more than one metaclass dependency table */
144 #define VMERR_IMAGE_METADEP_REDEF 313
145
146 /* file does not contain a metaclass dependency table */
147 #define VMERR_IMAGE_NO_METADEP 314
148
149 /* file contains more than one than one function set dependency table */
150 #define VMERR_IMAGE_FUNCDEP_REDEF 315
151
152 /* file does not contain a function set dependency table */
153 #define VMERR_IMAGE_NO_FUNCDEP 316
154
155 /* file contains multiple entrypoint definitions */
156 #define VMERR_IMAGE_ENTRYPT_REDEF 317
157
158 /* file does not contain an entrypoint definition */
159 #define VMERR_IMAGE_NO_ENTRYPT 318
160
161 /* incompatible image file format */
162 #define VMERR_IMAGE_INCOMPAT_VSN 319
163
164 /* cannot execute - image contains no code */
165 #define VMERR_IMAGE_NO_CODE 320
166
167 /* image file has incompatible format: method header too old */
168 #define VMERR_IMAGE_INCOMPAT_HDR_FMT 321
169
170 /*
171 * Unavailable intrinsic function called (index %d in function set "%s")
172 * -- this indicates that a function was invoked in a function set that
173 * provides only a subset of its functions. This normally can occur
174 * only when running 'preinit' or similar special situations when
175 * intrinsics are resolved on each call rather than during the initial
176 * load.
177 */
178 #define VMERR_UNAVAIL_INTRINSIC 322
179
180 /* unknown internal metaclass ID %d */
181 #define VMERR_UNKNOWN_METACLASS_INTERNAL 323
182
183 /* page mask not allowed for in-memory image file */
184 #define VMERR_XOR_MASK_BAD_IN_MEM 324
185
186 /* no image file found in executable */
187 #define VMERR_NO_IMAGE_IN_EXE 325
188
189 /* object size exceeds hardware limits of this computer */
190 #define VMERR_OBJ_SIZE_OVERFLOW 326
191
192 /* metaclass "%s" version is not available (latest available is "%s") */
193 #define VMERR_METACLASS_TOO_OLD 327
194
195 /* incorrect metaclass data (corrupted image file) */
196 #define VMERR_INVAL_METACLASS_DATA 328
197
198 /* object cannot be created */
199 #define VMERR_BAD_STATIC_NEW 329
200
201 /* function set "%s" version is not available (latest available is "%s") */
202 #define VMERR_FUNCSET_TOO_OLD 330
203
204 /* invalid type for exported symbol %s */
205 #define VMERR_INVAL_EXPORT_TYPE 331
206
207 /* invalid data in image file macro definitions (code %d) */
208 #define VMERR_INVAL_IMAGE_MACRO 332
209
210 /* no "mainRestore" export - cannot restore saved state on startup */
211 #define VMERR_NO_MAINRESTORE 333
212
213 /* incompatible debugger - image file must be recompiled for this debugger */
214 #define VMERR_IMAGE_INCOMPAT_VSN_DBG 334
215
216
217 /* ------------------------------------------------------------------------ */
218 /*
219 * Network errors
220 */
221
222 /* network safety level error (operation prohibited by safety settings) */
223 #define VMERR_NETWORK_SAFETY 400
224
225
226 /* ------------------------------------------------------------------------ */
227 /*
228 * Property-related errors
229 */
230
231 /* this property cannot be set for this object */
232 #define VMERR_INVALID_SETPROP 1001
233
234
235 /* ------------------------------------------------------------------------ */
236 /*
237 * Saved state file errors
238 */
239
240 /* file is not a valid saved state file */
241 #define VMERR_NOT_SAVED_STATE 1201
242
243 /* file was not saved by the same image or image version */
244 #define VMERR_WRONG_SAVED_STATE 1202
245
246 /* metaclass name is too long in saved file */
247 #define VMERR_SAVED_META_TOO_LONG 1203
248
249 /* object ID in saved state is invalid */
250 #define VMERR_SAVED_OBJ_ID_INVALID 1206
251
252 /* saved state file is corrupted (checksum does not match) */
253 #define VMERR_BAD_SAVED_STATE 1207
254
255 /* invalid data in saved metaclass */
256 #define VMERR_BAD_SAVED_META_DATA 1208
257
258 /* storage server error */
259 #define VMERR_STORAGE_SERVER_ERR 1209
260
261 /* save file description table too large (64k format limit) */
262 #define VMERR_DESC_TAB_OVERFLOW 1210
263
264
265 /* ------------------------------------------------------------------------ */
266 /*
267 * Data manipulation and conversion errors
268 */
269
270 /* cannot convert value to a string */
271 #define VMERR_NO_STR_CONV 2001
272
273 /* conversion buffer overflow */
274 #define VMERR_CONV_BUF_OVF 2002
275
276 /* invalid datatype for "add" operator */
277 #define VMERR_BAD_TYPE_ADD 2003
278
279 /* numeric value required */
280 #define VMERR_NUM_VAL_REQD 2004
281
282 /* integer value required */
283 #define VMERR_INT_VAL_REQD 2005
284
285 /* cannot convert to logical value */
286 #define VMERR_NO_LOG_CONV 2006
287
288 /* invalid datatype for "subtract" operator */
289 #define VMERR_BAD_TYPE_SUB 2007
290
291 /* division by zero */
292 #define VMERR_DIVIDE_BY_ZERO 2008
293
294 /* invalid comparison */
295 #define VMERR_INVALID_COMPARISON 2009
296
297 /* object value required */
298 #define VMERR_OBJ_VAL_REQD 2010
299
300 /* property pointer value required */
301 #define VMERR_PROPPTR_VAL_REQD 2011
302
303 /* logical value required */
304 #define VMERR_LOG_VAL_REQD 2012
305
306 /* function pointer value required */
307 #define VMERR_FUNCPTR_VAL_REQD 2013
308
309 /* indexing operation cannot be applied to this datatype */
310 #define VMERR_CANNOT_INDEX_TYPE 2014
311
312 /* index value out of range */
313 #define VMERR_INDEX_OUT_OF_RANGE 2015
314
315 /* metaclass index out of range (probable image file error) */
316 #define VMERR_BAD_METACLASS_INDEX 2016
317
318 /* invalid dynamic object creation (metaclass does not support NEW) */
319 #define VMERR_BAD_DYNAMIC_NEW 2017
320
321 /* object value required for superclass */
322 #define VMERR_OBJ_VAL_REQD_SC 2018
323
324 /* string value required */
325 #define VMERR_STRING_VAL_REQD 2019
326
327 /* list value required */
328 #define VMERR_LIST_VAL_REQD 2020
329
330 /* list or string reference found in dictionary - can't convert to const */
331 #define VMERR_DICT_NO_CONST 2021
332
333 /* invalid object type */
334 #define VMERR_INVAL_OBJ_TYPE 2022
335
336 /* numeric overflow */
337 #define VMERR_NUM_OVERFLOW 2023
338
339 /* invalid datatype for "multiply" operator */
340 #define VMERR_BAD_TYPE_MUL 2024
341
342 /* invalid datatype for "divide" operator */
343 #define VMERR_BAD_TYPE_DIV 2025
344
345 /* invalid datatype for "negate" operator */
346 #define VMERR_BAD_TYPE_NEG 2026
347
348 /* value out of range */
349 #define VMERR_OUT_OF_RANGE 2027
350
351 /* string too large */
352 #define VMERR_STR_TOO_LONG 2028
353
354 /* list too large */
355 #define VMERR_LIST_TOO_LONG 2029
356
357 /* tree depth too large for equality test/hash calculation */
358 #define VMERR_TREE_TOO_DEEP_EQ 2030
359
360 /* cannot convert value to integer */
361 #define VMERR_NO_INT_CONV 2031
362
363 /* bad type for modulo */
364 #define VMERR_BAD_TYPE_MOD 2032
365
366 /* bad type for bitwise AND */
367 #define VMERR_BAD_TYPE_BIT_AND 2033
368
369 /* bad type for bitwise OR */
370 #define VMERR_BAD_TYPE_BIT_OR 2034
371
372 /* bad type for XOR */
373 #define VMERR_BAD_TYPE_XOR 2035
374
375 /* bad type for left shift */
376 #define VMERR_BAD_TYPE_SHL 2036
377
378 /* bad type for arithmetic right shift */
379 #define VMERR_BAD_TYPE_ASHR 2037
380
381 /* bad type for bitwise NOT */
382 #define VMERR_BAD_TYPE_BIT_NOT 2038
383
384 /* code pointer value required */
385 #define VMERR_CODEPTR_VAL_REQD 2039
386
387 /*
388 * exception object required (the VM threw an error based on an exception
389 * class defined in the bytecode program, but 'new X' didn't yield an
390 * object)
391 */
392 #define VMERR_EXCEPTION_OBJ_REQD 2040
393
394 /* cannot convert value to double */
395 #define VMERR_NO_DOUBLE_CONV 2041
396
397 /* cannot convert value to number */
398 #define VMERR_NO_NUM_CONV 2042
399
400 /* bad type for logical right shift */
401 #define VMERR_BAD_TYPE_LSHR 2043
402
403 /* ------------------------------------------------------------------------ */
404 /*
405 * Method and function invocation errors
406 */
407
408 /* wrong number of arguments */
409 #define VMERR_WRONG_NUM_OF_ARGS 2201
410
411 /* wrong number of arguments calling %s */
412 #define VMERR_WRONG_NUM_OF_ARGS_CALLING 2202
413
414 /* nil object reference */
415 #define VMERR_NIL_DEREF 2203
416
417 /* missing named argument */
418 #define VMERR_MISSING_NAMED_ARG 2204
419
420 /* invalid type for call */
421 #define VMERR_BAD_TYPE_CALL 2205
422
423 /* 'self' cannot be nil */
424 #define VMERR_NIL_SELF 2206
425
426
427
428 /* ------------------------------------------------------------------------ */
429 /*
430 * Object creation errors
431 */
432
433 /*
434 * cannot create an instance of the object, because the object is not a
435 * class
436 */
437 #define VMERR_CANNOT_CREATE_INST 2270
438
439 /* class cannot be created */
440 #define VMERR_ILLEGAL_NEW 2271
441
442
443 /* ------------------------------------------------------------------------ */
444 /*
445 * General execution errors
446 */
447
448 /* invalid opcode */
449 #define VMERR_INVALID_OPCODE 2301
450
451 /* unhandled exception */
452 #define VMERR_UNHANDLED_EXC 2302
453
454 /* stack overflow */
455 #define VMERR_STACK_OVERFLOW 2303
456
457 /* invalid type for built-in function */
458 #define VMERR_BAD_TYPE_BIF 2304
459
460 /* default string output function not defined */
461 #define VMERR_SAY_IS_NOT_DEFINED 2305
462
463 /* invalid value for built-in function (value out of range) */
464 #define VMERR_BAD_VAL_BIF 2306
465
466 /* breakpoint encountered */
467 #define VMERR_BREAKPOINT 2307
468
469 /* external function calls not implemented */
470 #define VMERR_CALLEXT_NOT_IMPL 2308
471
472 /* invalid opcode modifier */
473 #define VMERR_INVALID_OPCODE_MOD 2309
474
475 /* no character mapping file available */
476 #define VMERR_NO_CHARMAP_FILE 2310
477
478 /* unhandled exception: %s */
479 #define VMERR_UNHANDLED_EXC_PARAM 2311
480
481 /* VM Error: %s */
482 #define VMERR_VM_EXC_PARAM 2312
483
484 /* VM Error: code %d */
485 #define VMERR_VM_EXC_CODE 2313
486
487 /* exception executing static initializer for %*s.%*s: %s */
488 #define VMERR_EXC_IN_STATIC_INIT 2314
489
490 /*
491 * intrinsic class error (this is used as a fallback when an intrinsic
492 * class wants to throw an imported exception class, but the import
493 * doesn't exist; this doesn't provide any real information, but if the
494 * program doesn't export the required class then it's obviously not set
495 * up to receive any information anyway)
496 *
497 * this exception takes a string describing the error
498 */
499 #define VMERR_INTCLS_GENERAL_ERROR 2315
500
501 /* stack access out of bounds */
502 #define VMERR_STACK_OUT_OF_BOUNDS 2316
503
504
505 /* ------------------------------------------------------------------------ */
506 /*
507 * Debugger interface errors. These are errors that the debugger throws
508 * in response to the corresponding UI commands, to allow the user some
509 * rough interactive control over execution in the debugger environment.
510 */
511
512 /* abort - abort current command */
513 #define VMERR_DBG_ABORT 2391
514
515 /* restart - restart program execution */
516 #define VMERR_DBG_RESTART 2392
517
518 /* halt - terminate the program */
519 #define VMERR_DBG_HALT 2394
520
521 /* interrupt - user interrupted current operation (Ctrl+Break, etc) */
522 #define VMERR_DBG_INTERRUPT 2395
523
524 /* debugger not available */
525 #define VMERR_NO_DEBUGGER 2396
526
527
528 /* ------------------------------------------------------------------------ */
529 /*
530 * Debugger-related errors
531 */
532
533 /* invalid frame (in debug local/parameter operation) */
534 #define VMERR_BAD_FRAME 2500
535
536 /* invalid speculative evaluation */
537 #define VMERR_BAD_SPEC_EVAL 2501
538
539 /* invalid in debugger expression */
540 #define VMERR_INVAL_DBG_EXPR 2502
541
542 /* image file has no debugging information (must be recompiled) */
543 #define VMERR_NO_IMAGE_DBG_INFO 2503
544
545 /* ------------------------------------------------------------------------ */
546 /*
547 * BigNumber package errors
548 */
549
550 /* out of temporary registers - BigNumber calculation too complex */
551 #define VMERR_BIGNUM_NO_REGS 2600
552
553 /* value can't be converted to BigNumber */
554 #define VMERR_NO_BIGNUM_CONV 2601
555
556
557 #endif /* VMERRNUM_H */