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 42 /* ------------------------------------------------------------------------ */ 43 /* 44 * Memory manager errors 45 */ 46 47 /* 48 * requested object ID is already allocated to another object (this 49 * generally indicates that an image file or a saved state file contains 50 * invalid data) 51 */ 52 #define VMERR_OBJ_IN_USE 201 53 54 /* out of memory */ 55 #define VMERR_OUT_OF_MEMORY 202 56 57 /* out of memory allocating pool page (use a smaller in-memory cache) */ 58 #define VMERR_NO_MEM_FOR_PAGE 203 59 60 /* invalid page size - must be a power of two */ 61 #define VMERR_BAD_POOL_PAGE_SIZE 204 62 63 /* no more property ID's */ 64 #define VMERR_OUT_OF_PROPIDS 205 65 66 /* circular initialization dependency in intrinsic class (internal error) */ 67 #define VMERR_CIRCULAR_INIT 206 68 69 70 /* ------------------------------------------------------------------------ */ 71 /* 72 * Image file errors 73 */ 74 75 /* 76 * Unsupported metaclass -- the image file requires a metaclass that 77 * this VM implementation does not provide. This may indicate a version 78 * mismatch (a newer version of the VM is required), or that the image 79 * file is designed for a different host application environment. 80 */ 81 #define VMERR_UNKNOWN_METACLASS 301 82 83 /* 84 * Unsupported function set "%s" -- the image file requires a function 85 * set that this VM implementation does not provide. This may indicate 86 * a version mismatch (a newer version of the VM is required), or that 87 * the image file is designed for a different host application 88 * environment. 89 */ 90 #define VMERR_UNKNOWN_FUNC_SET 302 91 92 /* attempted to read past end of image file */ 93 #define VMERR_READ_PAST_IMG_END 303 94 95 /* not an image file (invalid signature) */ 96 #define VMERR_NOT_AN_IMAGE_FILE 304 97 98 /* unrecognized block type in image file */ 99 #define VMERR_UNKNOWN_IMAGE_BLOCK 305 100 101 /* data block too small (does not contain required data) */ 102 #define VMERR_IMAGE_BLOCK_TOO_SMALL 306 103 104 /* ill-formed image file: pool page before pool definition */ 105 #define VMERR_IMAGE_POOL_BEFORE_DEF 307 106 107 /* ill-formed image file: pool page out of range of definition */ 108 #define VMERR_IMAGE_POOL_BAD_PAGE 308 109 110 /* invalid pool ID in image file */ 111 #define VMERR_IMAGE_BAD_POOL_ID 309 112 113 /* attempted to load a pool page at an invalid offset */ 114 #define VMERR_LOAD_BAD_PAGE_IDX 310 115 116 /* attempted to load a pool page that hasn't been defined in the image */ 117 #define VMERR_LOAD_UNDEF_PAGE 311 118 119 /* ill-formed image file: pool is defined more than once */ 120 #define VMERR_IMAGE_POOL_REDEF 312 121 122 /* file contains more than one metaclass dependency table */ 123 #define VMERR_IMAGE_METADEP_REDEF 313 124 125 /* file does not contain a metaclass dependency table */ 126 #define VMERR_IMAGE_NO_METADEP 314 127 128 /* file contains more than one than one function set dependency table */ 129 #define VMERR_IMAGE_FUNCDEP_REDEF 315 130 131 /* file does not contain a function set dependency table */ 132 #define VMERR_IMAGE_NO_FUNCDEP 316 133 134 /* file contains multiple entrypoint definitions */ 135 #define VMERR_IMAGE_ENTRYPT_REDEF 317 136 137 /* file does not contain an entrypoint definition */ 138 #define VMERR_IMAGE_NO_ENTRYPT 318 139 140 /* incompatible image file format */ 141 #define VMERR_IMAGE_INCOMPAT_VSN 319 142 143 /* cannot execute - image contains no code */ 144 #define VMERR_IMAGE_NO_CODE 320 145 146 /* image file has incompatible format: method header too old */ 147 #define VMERR_IMAGE_INCOMPAT_HDR_FMT 321 148 149 /* 150 * Unavailable intrinsic function called (index %d in function set "%s") 151 * -- this indicates that a function was invoked in a function set that 152 * provides only a subset of its functions. This normally can occur 153 * only when running 'preinit' or similar special situations when 154 * intrinsics are resolved on each call rather than during the initial 155 * load. 156 */ 157 #define VMERR_UNAVAIL_INTRINSIC 322 158 159 /* unknown internal metaclass ID %d */ 160 #define VMERR_UNKNOWN_METACLASS_INTERNAL 323 161 162 /* page mask not allowed for in-memory image file */ 163 #define VMERR_XOR_MASK_BAD_IN_MEM 324 164 165 /* no image file found in executable */ 166 #define VMERR_NO_IMAGE_IN_EXE 325 167 168 /* object size exceeds hardware limits of this computer */ 169 #define VMERR_OBJ_SIZE_OVERFLOW 326 170 171 /* metaclass "%s" version is not available (latest available is "%s") */ 172 #define VMERR_METACLASS_TOO_OLD 327 173 174 /* incorrect metaclass data (corrupted image file) */ 175 #define VMERR_INVAL_METACLASS_DATA 328 176 177 /* object cannot be created */ 178 #define VMERR_BAD_STATIC_NEW 329 179 180 /* function set "%s" version is not available (latest available is "%s") */ 181 #define VMERR_FUNCSET_TOO_OLD 330 182 183 /* invalid type for exported symbol %s */ 184 #define VMERR_INVAL_EXPORT_TYPE 331 185 186 /* invalid data in image file macro definitions (code %d) */ 187 #define VMERR_INVAL_IMAGE_MACRO 332 188 189 /* no "mainRestore" export - cannot restore saved state on startup */ 190 #define VMERR_NO_MAINRESTORE 333 191 192 193 /* ------------------------------------------------------------------------ */ 194 /* 195 * Property-related errors 196 */ 197 198 /* this property cannot be set for this object */ 199 #define VMERR_INVALID_SETPROP 1001 200 201 202 /* ------------------------------------------------------------------------ */ 203 /* 204 * Saved state file errors 205 */ 206 207 /* file is not a valid saved state file */ 208 #define VMERR_NOT_SAVED_STATE 1201 209 210 /* file was not saved by the same image or image version */ 211 #define VMERR_WRONG_SAVED_STATE 1202 212 213 /* metaclass name is too long in saved file */ 214 #define VMERR_SAVED_META_TOO_LONG 1203 215 216 /* save/restore/reset is not valid in recursive VM invocation */ 217 #define VMERR_RECURSIVE_VM_CALL 1204 218 219 /* stack overflow reading from saved state */ 220 #define VMERR_SAVED_STACK_OVERFLOW 1205 221 222 /* object ID in saved state is invalid */ 223 #define VMERR_SAVED_OBJ_ID_INVALID 1206 224 225 /* saved state file is corrupted (checksum does not match) */ 226 #define VMERR_BAD_SAVED_STATE 1207 227 228 /* invalid data in saved metaclass */ 229 #define VMERR_BAD_SAVED_META_DATA 1208 230 231 /* ------------------------------------------------------------------------ */ 232 /* 233 * Data manipulation and conversion errors 234 */ 235 236 /* cannot convert value to a string */ 237 #define VMERR_NO_STR_CONV 2001 238 239 /* conversion buffer overflow */ 240 #define VMERR_CONV_BUF_OVF 2002 241 242 /* invalid datatype for "add" operator */ 243 #define VMERR_BAD_TYPE_ADD 2003 244 245 /* numeric value required */ 246 #define VMERR_NUM_VAL_REQD 2004 247 248 /* integer value required */ 249 #define VMERR_INT_VAL_REQD 2005 250 251 /* cannot convert to logical value */ 252 #define VMERR_NO_LOG_CONV 2006 253 254 /* invalid datatype for "subtract" operator */ 255 #define VMERR_BAD_TYPE_SUB 2007 256 257 /* division by zero */ 258 #define VMERR_DIVIDE_BY_ZERO 2008 259 260 /* invalid comparison */ 261 #define VMERR_INVALID_COMPARISON 2009 262 263 /* object value required */ 264 #define VMERR_OBJ_VAL_REQD 2010 265 266 /* property pointer value required */ 267 #define VMERR_PROPPTR_VAL_REQD 2011 268 269 /* logical value required */ 270 #define VMERR_LOG_VAL_REQD 2012 271 272 /* function pointer value required */ 273 #define VMERR_FUNCPTR_VAL_REQD 2013 274 275 /* indexing operation cannot be applied to this datatype */ 276 #define VMERR_CANNOT_INDEX_TYPE 2014 277 278 /* index value out of range */ 279 #define VMERR_INDEX_OUT_OF_RANGE 2015 280 281 /* metaclass index out of range (probable image file error) */ 282 #define VMERR_BAD_METACLASS_INDEX 2016 283 284 /* invalid dynamic object creation (metaclass does not support NEW) */ 285 #define VMERR_BAD_DYNAMIC_NEW 2017 286 287 /* object value required for superclass */ 288 #define VMERR_OBJ_VAL_REQD_SC 2018 289 290 /* string value required */ 291 #define VMERR_STRING_VAL_REQD 2019 292 293 /* list value required */ 294 #define VMERR_LIST_VAL_REQD 2020 295 296 /* list or string reference found in dictionary - can't convert to const */ 297 #define VMERR_DICT_NO_CONST 2021 298 299 /* invalid object type */ 300 #define VMERR_INVAL_OBJ_TYPE 2022 301 302 /* numeric overflow */ 303 #define VMERR_NUM_OVERFLOW 2023 304 305 /* invalid datatype for "multiply" operator */ 306 #define VMERR_BAD_TYPE_MUL 2024 307 308 /* invalid datatype for "divide" operator */ 309 #define VMERR_BAD_TYPE_DIV 2025 310 311 /* invalid datatype for "negate" operator */ 312 #define VMERR_BAD_TYPE_NEG 2026 313 314 /* value out of range */ 315 #define VMERR_OUT_OF_RANGE 2027 316 317 /* string too large */ 318 #define VMERR_STR_TOO_LONG 2028 319 320 /* list too large */ 321 #define VMERR_LIST_TOO_LONG 2029 322 323 /* tree depth too large for equality test/hash calculation */ 324 #define VMERR_TREE_TOO_DEEP_EQ 2030 325 326 327 /* ------------------------------------------------------------------------ */ 328 /* 329 * Method and function invocation errors 330 */ 331 332 /* wrong number of arguments */ 333 #define VMERR_WRONG_NUM_OF_ARGS 2201 334 335 /* wrong number of arguments calling %s */ 336 #define VMERR_WRONG_NUM_OF_ARGS_CALLING 2202 337 338 /* nil object reference */ 339 #define VMERR_NIL_DEREF 2203 340 341 342 /* ------------------------------------------------------------------------ */ 343 /* 344 * Object creation errors 345 */ 346 347 /* 348 * cannot create an instance of the object, because the object is not a 349 * class 350 */ 351 #define VMERR_CANNOT_CREATE_INST 2270 352 353 /* class cannot be created */ 354 #define VMERR_ILLEGAL_NEW 2271 355 356 357 /* ------------------------------------------------------------------------ */ 358 /* 359 * General execution errors 360 */ 361 362 /* invalid opcode */ 363 #define VMERR_INVALID_OPCODE 2301 364 365 /* unhandled exception */ 366 #define VMERR_UNHANDLED_EXC 2302 367 368 /* stack overflow */ 369 #define VMERR_STACK_OVERFLOW 2303 370 371 /* invalid type for built-in function */ 372 #define VMERR_BAD_TYPE_BIF 2304 373 374 /* default string output function not defined */ 375 #define VMERR_SAY_IS_NOT_DEFINED 2305 376 377 /* invalid value for built-in function (value out of range) */ 378 #define VMERR_BAD_VAL_BIF 2306 379 380 /* breakpoint encountered */ 381 #define VMERR_BREAKPOINT 2307 382 383 /* external function calls not implemented */ 384 #define VMERR_CALLEXT_NOT_IMPL 2308 385 386 /* invalid opcode modifier */ 387 #define VMERR_INVALID_OPCODE_MOD 2309 388 389 /* no character mapping file available */ 390 #define VMERR_NO_CHARMAP_FILE 2310 391 392 /* unhandled exception: %s */ 393 #define VMERR_UNHANDLED_EXC_PARAM 2311 394 395 /* VM Error: %s */ 396 #define VMERR_VM_EXC_PARAM 2312 397 398 /* VM Error: code %d */ 399 #define VMERR_VM_EXC_CODE 2313 400 401 /* exception executing static initializer for %*s.%*s: %s */ 402 #define VMERR_EXC_IN_STATIC_INIT 2314 403 404 /* 405 * intrinsic class error (this is used as a fallback when an intrinsic 406 * class wants to throw an imported exception class, but the import 407 * doesn't exist; this doesn't provide any real information, but if the 408 * program doesn't export the required class then it's obviously not set 409 * up to receive any information anyway) 410 * 411 * this exception takes a string describing the error 412 */ 413 #define VMERR_INTCLS_GENERAL_ERROR 2315 414 415 416 /* ------------------------------------------------------------------------ */ 417 /* 418 * Debugger interface errors. These are errors that the debugger throws 419 * in response to the corresponding UI commands, to allow the user some 420 * rough interactive control over execution in the debugger environment. 421 */ 422 423 /* abort - abort current command */ 424 #define VMERR_DBG_ABORT 2391 425 426 /* restart - restart program execution */ 427 #define VMERR_DBG_RESTART 2392 428 429 430 /* ------------------------------------------------------------------------ */ 431 /* 432 * TADS built-in function set errors 433 */ 434 435 /* invalid file handle */ 436 #define VMERR_BAD_FILE_HANDLE 2400 437 438 439 /* ------------------------------------------------------------------------ */ 440 /* 441 * Debugger-related errors 442 */ 443 444 /* invalid frame (in debug local/parameter operation) */ 445 #define VMERR_BAD_FRAME 2500 446 447 /* invalid speculative evaluation */ 448 #define VMERR_BAD_SPEC_EVAL 2501 449 450 /* invalid in debugger expression */ 451 #define VMERR_INVAL_DBG_EXPR 2502 452 453 /* image file has no debugging information (must be recompiled) */ 454 #define VMERR_NO_IMAGE_DBG_INFO 2503 455 456 /* ------------------------------------------------------------------------ */ 457 /* 458 * BigNumber package errors 459 */ 460 #define VMERR_BIGNUM_NO_REGS 2600 461 462 #endif /* VMERRNUM_H */ 463 464