File: vmerrnum.h

package info (click to toggle)
qtads 2.1.6-1.1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 16,156 kB
  • ctags: 18,767
  • sloc: cpp: 133,078; ansic: 26,048; xml: 18; makefile: 11
file content (557 lines) | stat: -rw-r--r-- 15,353 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
/* $Header: d:/cvsroot/tads/tads3/VMERRNUM.H,v 1.3 1999/07/11 00:46:58 MJRoberts Exp $ */

/* 
 *   Copyright (c) 1998, 2002 Michael J. Roberts.  All Rights Reserved.
 *   
 *   Please see the accompanying license file, LICENSE.TXT, for information
 *   on using and copying this software.  
 */
/*
Name
  vmerrnum.h - VM error numbers
Function
  
Notes
  VM Error Numbers are in the range 1 to 9999.
Modified
  10/28/98 MJRoberts  - Creation
*/

#ifndef VMERRNUM_H
#define VMERRNUM_H


/* ------------------------------------------------------------------------ */
/*
 *   File errors 
 */

/* error reading file */
#define VMERR_READ_FILE           101

/* error writing file */
#define VMERR_WRITE_FILE          102

/* file not found */
#define VMERR_FILE_NOT_FOUND      103

/* error creating file */
#define VMERR_CREATE_FILE         104

/* error closing/committing file */
#define VMERR_CLOSE_FILE          105

/* error deleting file */
#define VMERR_DELETE_FILE         106

/* data packer parsing error at format string index %d */
#define VMERR_PACK_PARSE          107

/* data packer argument mismatch at format string index %d */
#define VMERR_PACK_ARG_MISMATCH   108

/* data packer argument count mismatch at format string index %d */
#define VMERR_PACK_ARGC_MISMATCH  109

/* operation not supported for network server files */
#define VMERR_NET_FILE_NOIMPL     110

/* error renaming file */
#define VMERR_RENAME_FILE         111


/* ------------------------------------------------------------------------ */
/*
 *   Memory manager errors
 */

/* 
 *   requested object ID is already allocated to another object (this
 *   generally indicates that an image file or a saved state file contains
 *   invalid data) 
 */
#define VMERR_OBJ_IN_USE          201

/* out of memory */
#define VMERR_OUT_OF_MEMORY       202

/* out of memory allocating pool page (use a smaller in-memory cache) */
#define VMERR_NO_MEM_FOR_PAGE     203

/* invalid page size - must be a power of two */
#define VMERR_BAD_POOL_PAGE_SIZE  204

/* no more property ID's */
#define VMERR_OUT_OF_PROPIDS      205

/* circular initialization dependency in intrinsic class (internal error) */
#define VMERR_CIRCULAR_INIT       206


/* ------------------------------------------------------------------------ */
/*
 *   Image file errors 
 */

/* 
 *   Unsupported metaclass -- the image file requires a metaclass that
 *   this VM implementation does not provide.  This may indicate a version
 *   mismatch (a newer version of the VM is required), or that the image
 *   file is designed for a different host application environment.  
 */
#define VMERR_UNKNOWN_METACLASS   301

/*
 *   Unsupported function set "%s" -- the image file requires a function
 *   set that this VM implementation does not provide.  This may indicate
 *   a version mismatch (a newer version of the VM is required), or that
 *   the image file is designed for a different host application
 *   environment.  
 */
#define VMERR_UNKNOWN_FUNC_SET    302

/* attempted to read past end of image file */
#define VMERR_READ_PAST_IMG_END   303

/* not an image file (invalid signature) */
#define VMERR_NOT_AN_IMAGE_FILE   304

/* unrecognized block type in image file */
#define VMERR_UNKNOWN_IMAGE_BLOCK 305

/* data block too small (does not contain required data) */
#define VMERR_IMAGE_BLOCK_TOO_SMALL 306

/* ill-formed image file: pool page before pool definition */
#define VMERR_IMAGE_POOL_BEFORE_DEF 307

/* ill-formed image file: pool page out of range of definition */
#define VMERR_IMAGE_POOL_BAD_PAGE 308

/* invalid pool ID in image file */
#define VMERR_IMAGE_BAD_POOL_ID   309

/* attempted to load a pool page at an invalid offset */
#define VMERR_LOAD_BAD_PAGE_IDX   310

/* attempted to load a pool page that hasn't been defined in the image */
#define VMERR_LOAD_UNDEF_PAGE     311

/* ill-formed image file: pool is defined more than once */
#define VMERR_IMAGE_POOL_REDEF    312

/* file contains more than one metaclass dependency table */
#define VMERR_IMAGE_METADEP_REDEF 313

/* file does not contain a metaclass dependency table */
#define VMERR_IMAGE_NO_METADEP    314

/* file contains more than one than one function set dependency table */
#define VMERR_IMAGE_FUNCDEP_REDEF 315

/* file does not contain a function set dependency table */
#define VMERR_IMAGE_NO_FUNCDEP    316

/* file contains multiple entrypoint definitions */
#define VMERR_IMAGE_ENTRYPT_REDEF 317

/* file does not contain an entrypoint definition */
#define VMERR_IMAGE_NO_ENTRYPT    318

/* incompatible image file format */
#define VMERR_IMAGE_INCOMPAT_VSN  319

/* cannot execute - image contains no code */
#define VMERR_IMAGE_NO_CODE       320

/* image file has incompatible format: method header too old */
#define VMERR_IMAGE_INCOMPAT_HDR_FMT 321

/* 
 *   Unavailable intrinsic function called (index %d in function set "%s")
 *   -- this indicates that a function was invoked in a function set that
 *   provides only a subset of its functions.  This normally can occur
 *   only when running 'preinit' or similar special situations when
 *   intrinsics are resolved on each call rather than during the initial
 *   load. 
 */
#define VMERR_UNAVAIL_INTRINSIC   322

/* unknown internal metaclass ID %d */
#define VMERR_UNKNOWN_METACLASS_INTERNAL 323

/* page mask not allowed for in-memory image file */
#define VMERR_XOR_MASK_BAD_IN_MEM  324

/* no image file found in executable */
#define VMERR_NO_IMAGE_IN_EXE     325

/* object size exceeds hardware limits of this computer */
#define VMERR_OBJ_SIZE_OVERFLOW   326

/* metaclass "%s" version is not available (latest available is "%s") */
#define VMERR_METACLASS_TOO_OLD   327

/* incorrect metaclass data (corrupted image file) */
#define VMERR_INVAL_METACLASS_DATA 328

/* object cannot be created */
#define VMERR_BAD_STATIC_NEW      329

/* function set "%s" version is not available (latest available is "%s") */
#define VMERR_FUNCSET_TOO_OLD     330

/* invalid type for exported symbol %s */
#define VMERR_INVAL_EXPORT_TYPE   331

/* invalid data in image file macro definitions (code %d) */
#define VMERR_INVAL_IMAGE_MACRO   332

/* no "mainRestore" export - cannot restore saved state on startup */
#define VMERR_NO_MAINRESTORE      333

/* incompatible debugger - image file must be recompiled for this debugger */
#define VMERR_IMAGE_INCOMPAT_VSN_DBG   334


/* ------------------------------------------------------------------------ */
/*
 *   Network errors 
 */

/* network safety level error (operation prohibited by safety settings) */
#define VMERR_NETWORK_SAFETY      400


/* ------------------------------------------------------------------------ */
/*
 *   Property-related errors 
 */

/* this property cannot be set for this object */
#define VMERR_INVALID_SETPROP     1001


/* ------------------------------------------------------------------------ */
/*
 *   Saved state file errors 
 */

/* file is not a valid saved state file */
#define VMERR_NOT_SAVED_STATE     1201

/* file was not saved by the same image or image version */
#define VMERR_WRONG_SAVED_STATE   1202

/* metaclass name is too long in saved file */
#define VMERR_SAVED_META_TOO_LONG 1203

/* object ID in saved state is invalid */
#define VMERR_SAVED_OBJ_ID_INVALID 1206

/* saved state file is corrupted (checksum does not match) */
#define VMERR_BAD_SAVED_STATE     1207

/* invalid data in saved metaclass */
#define VMERR_BAD_SAVED_META_DATA 1208

/* storage server error */
#define VMERR_STORAGE_SERVER_ERR  1209

/* save file description table too large (64k format limit) */
#define VMERR_DESC_TAB_OVERFLOW   1210


/* ------------------------------------------------------------------------ */
/*
 *   Data manipulation and conversion errors
 */

/* cannot convert value to a string */
#define VMERR_NO_STR_CONV         2001

/* conversion buffer overflow */
#define VMERR_CONV_BUF_OVF        2002

/* invalid datatype for "add" operator */
#define VMERR_BAD_TYPE_ADD        2003

/* numeric value required */
#define VMERR_NUM_VAL_REQD        2004

/* integer value required */
#define VMERR_INT_VAL_REQD        2005

/* cannot convert to logical value */
#define VMERR_NO_LOG_CONV         2006

/* invalid datatype for "subtract" operator */
#define VMERR_BAD_TYPE_SUB        2007

/* division by zero */
#define VMERR_DIVIDE_BY_ZERO      2008

/* invalid comparison */
#define VMERR_INVALID_COMPARISON  2009

/* object value required */
#define VMERR_OBJ_VAL_REQD        2010

/* property pointer value required */
#define VMERR_PROPPTR_VAL_REQD    2011

/* logical value required */
#define VMERR_LOG_VAL_REQD        2012

/* function pointer value required */
#define VMERR_FUNCPTR_VAL_REQD    2013

/* indexing operation cannot be applied to this datatype */
#define VMERR_CANNOT_INDEX_TYPE   2014

/* index value out of range */
#define VMERR_INDEX_OUT_OF_RANGE  2015

/* metaclass index out of range (probable image file error) */
#define VMERR_BAD_METACLASS_INDEX 2016

/* invalid dynamic object creation (metaclass does not support NEW) */
#define VMERR_BAD_DYNAMIC_NEW     2017

/* object value required for superclass */
#define VMERR_OBJ_VAL_REQD_SC     2018

/* string value required */
#define VMERR_STRING_VAL_REQD     2019

/* list value required */
#define VMERR_LIST_VAL_REQD       2020

/* list or string reference found in dictionary - can't convert to const */
#define VMERR_DICT_NO_CONST       2021

/* invalid object type */
#define VMERR_INVAL_OBJ_TYPE      2022

/* numeric overflow */
#define VMERR_NUM_OVERFLOW        2023

/* invalid datatype for "multiply" operator */
#define VMERR_BAD_TYPE_MUL        2024

/* invalid datatype for "divide" operator */
#define VMERR_BAD_TYPE_DIV        2025

/* invalid datatype for "negate" operator */
#define VMERR_BAD_TYPE_NEG        2026

/* value out of range */
#define VMERR_OUT_OF_RANGE        2027

/* string too large */
#define VMERR_STR_TOO_LONG        2028

/* list too large */
#define VMERR_LIST_TOO_LONG       2029

/* tree depth too large for equality test/hash calculation */
#define VMERR_TREE_TOO_DEEP_EQ    2030

/* cannot convert value to integer */
#define VMERR_NO_INT_CONV         2031

/* bad type for modulo */
#define VMERR_BAD_TYPE_MOD        2032

/* bad type for bitwise AND */
#define VMERR_BAD_TYPE_BIT_AND    2033

/* bad type for bitwise OR */
#define VMERR_BAD_TYPE_BIT_OR     2034

/* bad type for XOR */
#define VMERR_BAD_TYPE_XOR        2035

/* bad type for left shift */
#define VMERR_BAD_TYPE_SHL        2036

/* bad type for arithmetic right shift */
#define VMERR_BAD_TYPE_ASHR       2037

/* bad type for bitwise NOT */
#define VMERR_BAD_TYPE_BIT_NOT    2038

/* code pointer value required */
#define VMERR_CODEPTR_VAL_REQD    2039

/* 
 *   exception object required (the VM threw an error based on an exception
 *   class defined in the bytecode program, but 'new X' didn't yield an
 *   object) 
 */
#define VMERR_EXCEPTION_OBJ_REQD  2040

/* cannot convert value to double */
#define VMERR_NO_DOUBLE_CONV      2041

/* cannot convert value to number */
#define VMERR_NO_NUM_CONV         2042

/* bad type for logical right shift */
#define VMERR_BAD_TYPE_LSHR       2043

/* ------------------------------------------------------------------------ */
/*
 *   Method and function invocation errors 
 */

/* wrong number of arguments */
#define VMERR_WRONG_NUM_OF_ARGS   2201

/* wrong number of arguments calling %s */
#define VMERR_WRONG_NUM_OF_ARGS_CALLING  2202

/* nil object reference */
#define VMERR_NIL_DEREF           2203

/* missing named argument */
#define VMERR_MISSING_NAMED_ARG   2204

/* invalid type for call */
#define VMERR_BAD_TYPE_CALL       2205

/* 'self' cannot be nil */
#define VMERR_NIL_SELF            2206



/* ------------------------------------------------------------------------ */
/*
 *   Object creation errors 
 */

/* 
 *   cannot create an instance of the object, because the object is not a
 *   class 
 */
#define VMERR_CANNOT_CREATE_INST  2270

/* class cannot be created */
#define VMERR_ILLEGAL_NEW         2271


/* ------------------------------------------------------------------------ */
/*
 *   General execution errors 
 */

/* invalid opcode */
#define VMERR_INVALID_OPCODE      2301

/* unhandled exception */
#define VMERR_UNHANDLED_EXC       2302

/* stack overflow */
#define VMERR_STACK_OVERFLOW      2303

/* invalid type for built-in function */
#define VMERR_BAD_TYPE_BIF        2304

/* default string output function not defined */
#define VMERR_SAY_IS_NOT_DEFINED  2305

/* invalid value for built-in function (value out of range) */
#define VMERR_BAD_VAL_BIF         2306

/* breakpoint encountered */
#define VMERR_BREAKPOINT          2307

/* external function calls not implemented */
#define VMERR_CALLEXT_NOT_IMPL    2308

/* invalid opcode modifier */
#define VMERR_INVALID_OPCODE_MOD  2309

/* no character mapping file available */
#define VMERR_NO_CHARMAP_FILE     2310

/* unhandled exception: %s */
#define VMERR_UNHANDLED_EXC_PARAM 2311

/* VM Error: %s */
#define VMERR_VM_EXC_PARAM        2312

/* VM Error: code %d */
#define VMERR_VM_EXC_CODE         2313

/* exception executing static initializer for %*s.%*s: %s */
#define VMERR_EXC_IN_STATIC_INIT  2314

/* 
 *   intrinsic class error (this is used as a fallback when an intrinsic
 *   class wants to throw an imported exception class, but the import
 *   doesn't exist; this doesn't provide any real information, but if the
 *   program doesn't export the required class then it's obviously not set
 *   up to receive any information anyway)
 *   
 *   this exception takes a string describing the error 
 */
#define VMERR_INTCLS_GENERAL_ERROR 2315

/* stack access out of bounds */
#define VMERR_STACK_OUT_OF_BOUNDS 2316


/* ------------------------------------------------------------------------ */
/*
 *   Debugger interface errors.  These are errors that the debugger throws
 *   in response to the corresponding UI commands, to allow the user some
 *   rough interactive control over execution in the debugger environment. 
 */

/* abort - abort current command */
#define VMERR_DBG_ABORT           2391

/* restart - restart program execution */
#define VMERR_DBG_RESTART         2392

/* halt - terminate the program */
#define VMERR_DBG_HALT            2394

/* interrupt - user interrupted current operation (Ctrl+Break, etc) */
#define VMERR_DBG_INTERRUPT       2395

/* debugger not available */
#define VMERR_NO_DEBUGGER         2396
   

/* ------------------------------------------------------------------------ */
/*
 *   Debugger-related errors 
 */

/* invalid frame (in debug local/parameter operation) */
#define VMERR_BAD_FRAME           2500

/* invalid speculative evaluation */
#define VMERR_BAD_SPEC_EVAL       2501

/* invalid in debugger expression */
#define VMERR_INVAL_DBG_EXPR      2502

/* image file has no debugging information (must be recompiled) */
#define VMERR_NO_IMAGE_DBG_INFO   2503
   
/* ------------------------------------------------------------------------ */
/*
 *   BigNumber package errors 
 */

/* out of temporary registers - BigNumber calculation too complex */
#define VMERR_BIGNUM_NO_REGS      2600

/* value can't be converted to BigNumber */
#define VMERR_NO_BIGNUM_CONV      2601


#endif /* VMERRNUM_H */