1 #ifdef RCSID
2 static char RCSid[] =
3 "$Header$";
4 #endif
5 
6 /*
7  *   Copyright (c) 2000, 2002 Michael J. Roberts.  All Rights Reserved.
8  *
9  *   Please see the accompanying license file, LICENSE.TXT, for information
10  *   on using and copying this software.
11  */
12 /*
13 Name
14   vmerrmsg.cpp - T3 VM error message strings
15 Function
16   Defines the message text for VM errors.  All error text is isolated into
17   this module for easy replacement in translated versions.
18 Notes
19 
20 Modified
21   05/13/00 MJRoberts  - Creation
22 */
23 
24 #include <stdarg.h>
25 #include <stdlib.h>
26 
27 #include "t3std.h"
28 #include "vmerr.h"
29 
30 /* ------------------------------------------------------------------------ */
31 /*
32  *   Enable or disable verbose messages.  To conserve memory, verbose
33  *   messages can be omitted.  To omit verbose messages, the platform
34  *   makefile should define the preprocessor symbol VMERR_OMIT_VERBOSE.
35  */
36 #ifdef VMERR_OMIT_VERBOSE
37 # define VMsg(msg) ""
38 #else
39 # define VMsg(msg) msg
40 #endif
41 
42 /*
43  *   To conserve even more memory, the messages can be omitted entirely.  To
44  *   disable all compiled-in messages, define VMERR_OMIT_MESSAGES.
45  */
46 
47 
48 /* ------------------------------------------------------------------------ */
49 /*
50  *   T3 VM Error Messages
51  *
52  *   The messages must be sorted by message number, so that we can perform
53  *   a binary search to look up a message by number.
54  */
55 const err_msg_t vm_messages_english[] =
56 {
57 #ifdef VMERR_OMIT_MESSAGES
58 
59     { 0, 0, 0 }
60 
61 #else /* VMERR_OMIT_MESSAGES */
62 
63     { VMERR_READ_FILE,
64     "error reading file",
65     VMsg("Error reading file.  The file might be corrupted or a media error "
66          "might have occurred.") },
67 
68     { VMERR_WRITE_FILE,
69     "error writing file",
70     VMsg("Error writing file.  The media might be full, or another media "
71          "error might have occurred.") },
72 
73     { VMERR_FILE_NOT_FOUND,
74     "file not found",
75     VMsg("Error opening file.  The specified file might not exist, you "
76          "might not have sufficient privileges to open the file, or "
77          "a sharing violation might have occurred.") },
78 
79     { VMERR_CREATE_FILE,
80     "error creating file",
81     VMsg("Error creating file.  You might not have sufficient privileges "
82          "to open the file, or a sharing violation might have occurred.") },
83 
84     { VMERR_OBJ_IN_USE,
85     "object ID in use - the image/save file might be corrupted",
86     VMsg("An object ID requested by the image/save file is already in use "
87          "and cannot be allocated to the file.  This might indicate that "
88          "the file is corrupted.") },
89 
90     { VMERR_OUT_OF_MEMORY,
91     "out of memory",
92     VMsg("Out of memory.  Try making more memory available by closing "
93          "other applications if possible.") },
94 
95     { VMERR_NO_MEM_FOR_PAGE,
96     "out of memory allocating pool page",
97     VMsg("Out of memory allocating pool page.  Try making more memory "
98          "available by closing other applications.") },
99 
100     { VMERR_BAD_POOL_PAGE_SIZE,
101     "invalid page size - file is not valid",
102     VMsg("Invalid page size.  The file being loaded is not valid.") },
103 
104     { VMERR_OUT_OF_PROPIDS,
105     "no more property ID's are available",
106     VMsg("Out of property ID's.  No more properties can be allocated.") },
107 
108     { VMERR_CIRCULAR_INIT,
109     "circular initialization dependency in intrinsic class (internal error)",
110     VMsg("Circular initialization dependency detected in intrinsic class.  "
111          "This indicates an internal error in the interpreter.  Please "
112          "report this error to the interpreter's maintainer.") },
113 
114     { VMERR_UNKNOWN_METACLASS,
115     "intrinsic class \"%s\" is not available",
116     VMsg("This image file requires an intrinsic class with the identifier "
117          "\"%s\", but the class is not available in this interpreter.  This "
118          "program cannot be executed with this interpreter.") },
119 
120     { VMERR_UNKNOWN_FUNC_SET,
121     "intrinsic function set \"%s\" is not available",
122     VMsg("This image file requires a function set with the identifier "
123          "\"%s\", but the function set is not available in this "
124          "intepreter.  This program cannot be executed with this "
125          "interpreter.") },
126 
127     { VMERR_READ_PAST_IMG_END,
128     "reading past end of image file",
129     VMsg("Reading past end of image file.  The image file might "
130          "be corrupted.") },
131 
132     { VMERR_NOT_AN_IMAGE_FILE,
133     "not an image file (invalid signature)",
134     VMsg("This file is not a valid image file - the file has an invalid "
135          "signature.  The image file might be corrupted.") },
136 
137     { VMERR_UNKNOWN_IMAGE_BLOCK,
138     "unknown block type - image file is incompatible with this interpreter "
139         "version",
140     VMsg("Unknown block type.  This image file is incompatible with this "
141          "version of the interpreter.") },
142 
143     { VMERR_IMAGE_BLOCK_TOO_SMALL,
144     "data block too small",
145     VMsg("A data block in the image file is too small.  The image file might "
146          "be corrupted.") },
147 
148     { VMERR_IMAGE_POOL_BEFORE_DEF,
149     "invalid image file: pool page before pool definition",
150     VMsg("This image file is invalid because it specifies a pool page "
151          "before the pool's definition.  The image file might be "
152          "corrupted.") },
153 
154     { VMERR_IMAGE_POOL_BAD_PAGE,
155     "invalid image file: pool page our of range of definition",
156     VMsg("This image file is invalid because it specifies a pool page "
157          "outside of the range of the pool's definition.  The image file "
158          "might be corrupted.") },
159 
160     { VMERR_IMAGE_BAD_POOL_ID,
161     "invalid image file: invalid pool ID",
162     VMsg("This image file is invalid because it specifies an invalid "
163          "pool ID.  The image file might be corrupted.") },
164 
165     { VMERR_LOAD_BAD_PAGE_IDX,
166     "invalid image file: bad page index",
167     VMsg("This image file is invalid because it specifies an invalid "
168          "page index.  The image file might be corrupted.") },
169 
170     { VMERR_LOAD_UNDEF_PAGE,
171     "loading undefined pool page",
172     VMsg("The program is attempting to load a pool page that is not present "
173          "in the image file.  The image file might be corrupted.") },
174 
175     { VMERR_IMAGE_POOL_REDEF,
176     "invalid image file: pool is defined more than once",
177     VMsg("This image file is invalid because it defines a pool more than "
178          "once.  The image file might be corrupted.") },
179 
180     { VMERR_IMAGE_METADEP_REDEF,
181     "invalid image file: multiple intrinsic class dependency tables found",
182     VMsg("This image file is invalid because it contains multiple "
183          "intrinsic class tables.  The image file might be corrupted.") },
184 
185     { VMERR_IMAGE_NO_METADEP,
186     "invalid image file: no intrinsic class dependency table found",
187     VMsg("This image file is invalid because it contains no intrinsic class "
188          "tables.  The image file might be corrupted.") },
189 
190     { VMERR_IMAGE_FUNCDEP_REDEF,
191     "invalid image file: multiple function set dependency tables found",
192     VMsg("This image file is invalid because it contains multiple "
193          "function set tables.  The image file might be corrupted.") },
194 
195     { VMERR_IMAGE_NO_FUNCDEP,
196     "invalid image file: no function set dependency table found",
197     VMsg("This image file is invalid because it contains no function set "
198          "tables.  The image file might be corrupted.") },
199 
200     { VMERR_IMAGE_ENTRYPT_REDEF,
201     "invalid image file: multiple entrypoints found",
202     VMsg("This image file is invalid because it contains multiple entrypoint "
203          "definitions.  The image file might be corrupted.") },
204 
205     { VMERR_IMAGE_NO_ENTRYPT,
206     "invalid image file: no entrypoint found",
207     VMsg("This image file is invalid because it contains no entrypoint "
208          "specification.  The image file might be corrupted.") },
209 
210     { VMERR_IMAGE_INCOMPAT_VSN,
211     "incompatible image file format version",
212     VMsg("This image file has an incompatible format version.  You must "
213          "obtain a newer version of the interpreter to execute this "
214          "program.") },
215 
216     { VMERR_IMAGE_NO_CODE,
217     "image contains no code",
218     VMsg("This image file contains no executable code.  The file might "
219          "be corrupted.") },
220 
221     { VMERR_IMAGE_INCOMPAT_HDR_FMT,
222     "incomptabile image file format: method header too old",
223     VMsg("This image file has an incompatible method header format.  "
224          "This is an older image file version which this interpreter "
225          "does not support.") },
226 
227     { VMERR_UNAVAIL_INTRINSIC,
228     "unavailable intrinsic function called (index %d in function set \"%s\"",
229     VMsg("Unavailable intrinsic function called (the function is at "
230          "index %d in function set \"%s\").  This function is not available "
231          "in this version of the interpreter and cannot be called when "
232          "running the program with this version.  This normally indicates "
233          "that the \"preinit\" function, or code invoked by preinit, "
234          "called an intrinsic that is invalid during compile-time "
235          "pre-initialization.") },
236 
237     { VMERR_UNKNOWN_METACLASS_INTERNAL,
238     "unknown internal intrinsic class ID %x",
239     VMsg("Unknown internal intrinsic class ID %x.  This indicates an "
240          "internal error in the interpreter.  Please report this error "
241          "to the interpreter's maintainer.") },
242 
243     { VMERR_XOR_MASK_BAD_IN_MEM,
244     "page mask is not allowed for in-memory image file",
245     VMsg("This image file cannot be loaded from memory because it contains "
246          "masked data.  Masked data is not valid with in-memory files.  "
247          "This probably indicates that the program file was not installed "
248          "properly; you must convert this program file for in-memory use "
249          "before you can load the program with this version of the "
250          "interpreter.") },
251 
252     { VMERR_NO_IMAGE_IN_EXE,
253     "no embedded image file found in executable",
254     VMsg("This executable does not contain an embedded image file.  The "
255          "application might not be configured properly or might need to "
256          "be rebuilt.  Re-install the application or obtain an updated "
257          "version from the application's author.") },
258 
259     { VMERR_OBJ_SIZE_OVERFLOW,
260     "object size exceeds hardware limits of this computer",
261     VMsg("An object defined in this program file exceeds the hardware limits "
262          "of this computer.  This program cannot be executed on this type "
263          "of computer or operating system.  Contact the program's author "
264          "for assistance.") },
265 
266     { VMERR_METACLASS_TOO_OLD,
267     "intrinsic class \"%s\" version is not available - latest available "
268              "version is \"%s\"",
269     VMsg("This program needs the intrinsic class \"%s\".  This VM "
270          "implementation does not provide a sufficiently recent version "
271          "of this intrinsic class; the latest version available in this "
272          "VM is \"%s\".  This program cannot run with this version of the "
273          "VM; you must use a more recent version of the VM to execute this "
274          "program.") },
275 
276     { VMERR_INVAL_METACLASS_DATA,
277     "invalid intrinsic class data - image file may be corrupted",
278     VMsg("Invalid data were detected in an intrinsic class.  This might "
279          "indicate that the image file has been corrupted.  You might need "
280          "to re-install the program.") },
281 
282     { VMERR_BAD_STATIC_NEW,
283     "invalid object - class does not allow loading",
284     VMsg("An object in the image file cannot be loaded because its class "
285          "does not allow creation of objects of the class.  This usually "
286          "means that the class is abstract and cannot be instantiated "
287          "as a concrete object.") },
288 
289     { VMERR_FUNCSET_TOO_OLD,
290     "function set \"%s\" version is not available - latest available "
291         "version is \"%s\"",
292      VMsg("This program needs the function set \"%s\".  This VM "
293           "implementation does not provide a sufficiently recent version "
294           "of this function set; the latest version available in this VM "
295           "is \"%s\".  This program cannot run with this version of the "
296           "VM; you must use a more recent version of the VM to execute "
297           "this program.") },
298 
299     { VMERR_INVAL_EXPORT_TYPE,
300     "exported symbol \"%s\" is of incorrect datatype",
301     VMsg("The exported symbol \"%s\" is of the incorrect datatype.  Check "
302          "the program and the library version.") },
303 
304     { VMERR_INVAL_IMAGE_MACRO,
305     "invalid data in macro definitions in image file (error code %d)",
306     VMsg("The image file contains invalid data in the macro symbols "
307          "in the debugging records: macro loader error code %d.  This "
308          "might indicate that the image file is corrupted.") },
309 
310     { VMERR_NO_MAINRESTORE,
311     "this program is not capable of restoring a saved state on startup",
312     VMsg("This program is not capable of restoring a saved state on "
313          "startup.  To restore the saved state, you must run the program "
314          "normally, then use the appropriate command or operation within "
315          "the running program to restore the saved position file.") },
316 
317     { VMERR_INVALID_SETPROP,
318     "property cannot be set for object",
319     VMsg("Invalid property change - this property cannot be set for this "
320          "object.  This normally indicates that the object is of a type "
321          "that does not allow setting of properties at all, or at least "
322          "of certain properties.  For example, a string object does not "
323          "allow setting properties at all.") },
324 
325     { VMERR_NOT_SAVED_STATE,
326     "file is not a valid saved state file",
327     VMsg("This file is not a valid saved state file.  Either the file was "
328          "not created as a saved state file, or its contents have been "
329          "corrupted.") },
330 
331     { VMERR_WRONG_SAVED_STATE,
332     "saved state is for a different program or a different version of "
333         "this program",
334         VMsg("This file does not contain saved state information for "
335              "this program.  The file was saved by another program, or "
336              "by a different version of this program; in either case, it "
337              "cannot be restored with this version of this program.") },
338 
339     { VMERR_SAVED_META_TOO_LONG,
340     "intrinsic class name in saved state file is too long",
341     VMsg("An intrinsic class name in the saved state file is too long.  "
342          "The file might be corrupted, or might have been saved by an "
343          "incompatible version of the interpreter.") },
344 
345     { VMERR_RECURSIVE_VM_CALL,
346     "operation is not valid in a recursive VM invocation",
347     VMsg("The operation is not valid in the current "
348          "context, because the VM has been invoked recursively.  This "
349          "indicates an error in the program.") },
350 
351     { VMERR_SAVED_STACK_OVERFLOW,
352     "stack overflow restoring saved state file",
353     VMsg("The stack stored in the saved state file is too large for this "
354          "interpreter.  The state file might have been saved by an "
355          "incompatible version of the interpreter.") },
356 
357     { VMERR_SAVED_OBJ_ID_INVALID,
358     "invalid object ID in saved state file",
359     VMsg("The saved state file contains an invalid object ID.  The saved "
360          "state file might be corrupted.") },
361 
362     { VMERR_BAD_SAVED_STATE,
363     "saved state file is corrupted (incorrect checksum)",
364     VMsg("The saved state file's checksum is invalid.  This usually "
365          "indicates that the file has been corrupted (which could be "
366          "due to a media error, modification by another application, "
367          "or a file transfer that lost or changed data).") },
368 
369     { VMERR_BAD_SAVED_META_DATA,
370     "invalid intrinsic class data in saved state file",
371     VMsg("The saved state file contains intrinsic class data that "
372          "is not valid.  This usually means that the file was saved "
373          "with an incompatible version of the interpreter program.") },
374 
375     { VMERR_NO_STR_CONV,
376     "cannot convert value to string",
377     VMsg("This value cannot be converted to a string.") },
378 
379     { VMERR_CONV_BUF_OVF,
380     "string conversion buffer overflow",
381     VMsg("An internal buffer overflow occurred converting this value to "
382          "a string.") },
383 
384     { VMERR_BAD_TYPE_ADD,
385     "invalid datatypes for addition operator",
386     VMsg("Invalid datatypes for addition operator.  The values being added "
387          "cannot be combined in this manner.") },
388 
389     { VMERR_NUM_VAL_REQD,
390     "numeric value required",
391     VMsg("Invalid value type - a numeric value is required.") },
392 
393     { VMERR_INT_VAL_REQD,
394     "integer value required",
395     VMsg("Invalid value type - an integer value is required.") },
396 
397     { VMERR_NO_LOG_CONV,
398     "cannot convert value to logical (true/nil)",
399     VMsg("This value cannot be converted to a logical (true/nil) value.") },
400 
401     { VMERR_BAD_TYPE_SUB,
402     "invalid datatypes for subtraction operator",
403     VMsg("Invalid datatypes for subtraction operator.  The values used "
404          "cannot be combined in this manner.") },
405 
406     { VMERR_DIVIDE_BY_ZERO,
407     "division by zero",
408     VMsg("Arithmetic error - Division by zero.") },
409 
410     { VMERR_INVALID_COMPARISON,
411     "invalid comparison",
412     VMsg("Invalid comparison - these values cannot be compared "
413          "to one another.") },
414 
415     { VMERR_OBJ_VAL_REQD,
416     "object value required",
417     VMsg("An object value is required.") },
418 
419     { VMERR_PROPPTR_VAL_REQD,
420     "property pointer required",
421     VMsg("A property pointer value is required.") },
422 
423     { VMERR_LOG_VAL_REQD,
424     "logical value required",
425     VMsg("A logical (true/nil) value is required.") },
426 
427     { VMERR_FUNCPTR_VAL_REQD,
428     "function pointer required",
429     VMsg("A function pointer value is required.") },
430 
431     { VMERR_CANNOT_INDEX_TYPE,
432     "invalid index operation - this type of value cannot be indexed",
433     VMsg("This type of value cannot be indexed.") },
434 
435     { VMERR_INDEX_OUT_OF_RANGE,
436     "index out of range",
437     VMsg("The index value is out of range for the value being indexed (it is "
438          "too low or too high).") },
439 
440     { VMERR_BAD_METACLASS_INDEX,
441     "invalid intrinsic class index",
442     VMsg("The intrinsic class index is out of range.  This probably "
443          "indicates that the image file is corrupted.") },
444 
445     { VMERR_BAD_DYNAMIC_NEW,
446     "invalid dynamic object creation (intrinsic class does not support NEW)",
447     VMsg("This type of object cannot be dynamically created, because the "
448            "intrinsic class does not support dynamic creation.") },
449 
450     { VMERR_OBJ_VAL_REQD_SC,
451     "object value required for base class",
452     VMsg("An object value must be specified for the base class of a dynamic "
453          "object creation operation.  The superclass value is of a "
454          "non-object type.") },
455 
456     { VMERR_STRING_VAL_REQD,
457     "string value required",
458     VMsg("A string value is required.") },
459 
460     { VMERR_LIST_VAL_REQD,
461     "list value required",
462     VMsg("A list value is required.") },
463 
464     { VMERR_DICT_NO_CONST,
465     "list or string reference found in dictionary (entry \"%s\") - this "
466         "dictionary cannot be saved in the image file",
467      VMsg("A dictionary entry (for the string \"%s\") referred to a string "
468           "or list value for its associated value data.  This dictionary "
469           "cannot be stored in the image file, so the image file cannot "
470           "be created.  Check dictionary word additions and ensure that "
471           "only objects are added to the dictionary.") },
472 
473     { VMERR_INVAL_OBJ_TYPE,
474     "invalid object type - cannot convert to required object type",
475     VMsg("An object is not of the correct type.  The object specified "
476          "cannot be converted to the required object type.") },
477 
478     { VMERR_NUM_OVERFLOW,
479     "numeric overflow",
480     VMsg("A numeric calculation overflowed the limits of the datatype.") },
481 
482     { VMERR_BAD_TYPE_MUL,
483     "invalid datatypes for multiplication operator",
484     VMsg("Invalid datatypes for multiplication operator.  The values "
485          "being added cannot be combined in this manner.") },
486 
487     { VMERR_BAD_TYPE_DIV,
488     "invalid datatypes for division operator",
489     VMsg("Invalid datatypes for division operator.  The values being added "
490          "cannot be combined in this manner.") },
491 
492     { VMERR_BAD_TYPE_NEG,
493     "invalid datatype for arithmetic negation operator",
494     VMsg("Invalid datatype for arithmetic negation operator.  The value "
495          "cannot be negated.") },
496 
497     { VMERR_OUT_OF_RANGE,
498     "value is out of range",
499     VMsg("A value that was outside of the legal range of inputs was "
500          "specified for a calculation.") },
501 
502     { VMERR_STR_TOO_LONG,
503     "string is too long",
504     VMsg("A string value is limited to 65535 bytes in length.  This "
505          "string exceeds the length limit.") },
506 
507     { VMERR_LIST_TOO_LONG,
508     "list too long",
509     VMsg("A list value is limited to about 13100 elements.  This list "
510          "exceeds the limit.") },
511 
512     { VMERR_TREE_TOO_DEEP_EQ,
513     "maximum equality test/hash recursion depth exceeded",
514     VMsg("This equality comparison or hash calculation is too complex and "
515          "cannot be performed.  This usually indicates that a value "
516          "contains circular references, such as a Vector that contains "
517          "a reference to itself, or to another Vector that contains a "
518          "reference to the first one.  This type of value cannot be "
519          "compared for equality or used in a LookupTable.") },
520 
521     { VMERR_WRONG_NUM_OF_ARGS,
522     "wrong number of arguments",
523     VMsg("The wrong number of arguments was passed to a function or method "
524          "in the invocation of the function or method.") },
525 
526     { VMERR_WRONG_NUM_OF_ARGS_CALLING,
527     "argument mismatch calling %s - function definition is incorrect",
528     VMsg("The number of arguments doesn't match the number expected "
529          "calling %s.  Check the function or method and correct the "
530          "number of parameters that it is declared to receive.") },
531 
532     { VMERR_NIL_DEREF,
533     "nil object reference",
534      VMsg("The value 'nil' was used to reference an object property.  Only "
535           "valid object references can be used in property evaluations.") },
536 
537     { VMERR_CANNOT_CREATE_INST,
538     "cannot create instance of object - object is not a class",
539     VMsg("An instance of this object cannot be created, because this "
540          "object is not a class.") },
541 
542     { VMERR_ILLEGAL_NEW,
543     "cannot create instance - class does not allow dynamic construction",
544     VMsg("An instance of this class cannot be created, because this class "
545          "does not allow dynamic construction.") },
546 
547     { VMERR_INVALID_OPCODE,
548     "invalid opcode - possible image file corruption",
549     VMsg("Invalid instruction opcode - the image file might be corrupted.") },
550 
551     { VMERR_UNHANDLED_EXC,
552     "unhandled exception",
553     VMsg("An exception was thrown but was not caught by the program.  "
554          "The interpreter is terminating execution of the program.") },
555 
556     { VMERR_STACK_OVERFLOW,
557     "stack overflow",
558     VMsg("Stack overflow.  This indicates that function or method calls "
559          "were nested too deeply; this might have occurred because of "
560          "unterminated recursion, which can happen when a function or method "
561          "calls itself (either directly or indirectly).") },
562 
563     { VMERR_BAD_TYPE_BIF,
564     "invalid type for intrinsic function argument",
565     VMsg("An invalid datatype was provided for an intrinsic "
566          "function argument.") },
567 
568     { VMERR_SAY_IS_NOT_DEFINED,
569     "default output function is not defined",
570     VMsg("The default output function is not defined.  Implicit string "
571          "display is not allowed until a default output function "
572          "is specified.") },
573 
574     { VMERR_BAD_VAL_BIF,
575     "invalid value for intrinsic function argument",
576     VMsg("An invalid value was specified for an intrinsic function argument.  "
577          "The value is out of range or is not an allowed value.") },
578 
579     { VMERR_BREAKPOINT,
580     "breakpoint encountered",
581     VMsg("A breakpoint instruction was encountered, and no debugger is "
582          "active.  The compiler might have inserted this breakpoint to "
583          "indicate an invalid or unreachable location in the code, so "
584          "executing this instruction probably indicates an error in the "
585          "program.") },
586 
587     { VMERR_CALLEXT_NOT_IMPL,
588     "external function calls are not implemented in this version",
589     VMsg("This version of the interpreter does not implement external "
590          "function calls.  This program requires an interpreter that "
591          "provides external function call capabilities, so this program "
592          "is not compatible with this interpreter.") },
593 
594     { VMERR_INVALID_OPCODE_MOD,
595     "invalid opcode modifier - possible image file corruption",
596     VMsg("Invalid instruction opcode modifier - the image file might "
597          "be corrupted.") },
598 
599     /*
600      *   Note - do NOT use the VMsg() macro on this message, since we always
601      *   want to have this verbose message available.
602      */
603     { VMERR_NO_CHARMAP_FILE,
604     "No mapping file available for local character set \"%.32s\"",
605     "[Warning: no mapping file is available for the local character set "
606         "\"%.32s\".  The system will use a default ASCII character set "
607         "mapping instead, so accented characters will be displayed without "
608         "their accents.]" },
609 
610     { VMERR_UNHANDLED_EXC_PARAM,
611     "Unhandled exception: %s",
612     VMsg("Unhandled exception: %s") },
613 
614     { VMERR_VM_EXC_PARAM,
615     "VM Error: %s",
616     VMsg("VM Error: %s") },
617 
618     { VMERR_VM_EXC_CODE,
619     "VM Error: code %d",
620     VMsg("VM Error: code %d") },
621 
622     { VMERR_EXC_IN_STATIC_INIT,
623     "Exception in static initializer for %s.%s: %s",
624     VMsg("An exception occurred in the static initializer for "
625          "%s.%s: %s") },
626 
627     { VMERR_INTCLS_GENERAL_ERROR,
628     "intrinsic class exception: %s",
629     VMsg("Exception in intrinsic class method: %s") },
630 
631     { VMERR_DBG_ABORT,
632     "'abort' signal",
633     VMsg("'abort' signal") },
634 
635     { VMERR_DBG_RESTART,
636     "'restart' signal",
637     VMsg("'restart' signal") },
638 
639     { VMERR_BAD_FILE_HANDLE,
640     "invalid file handle",
641     VMsg("An invalid value was specified for the file handle in a call to "
642          "a file manipulation function.") },
643 
644     { VMERR_BAD_FRAME,
645     "invalid frame in debugger local/parameter evaluation",
646     VMsg("An invalid stack frame was specified in a debugger local/parameter "
647          "evaluation.  This probably indicates an internal problem in the "
648          "debugger.") },
649 
650     { VMERR_BAD_SPEC_EVAL,
651     "invalid speculative expression",
652     VMsg("This expression cannot be executed speculatively.  (This does not "
653          "indicate a problem; it's merely an internal condition in the "
654          "debugger.)") },
655 
656     { VMERR_INVAL_DBG_EXPR,
657     "invalid debugger expression",
658     VMsg("This expression cannot be evaluated in the debugger.") },
659 
660     { VMERR_NO_IMAGE_DBG_INFO,
661     "image file has no debugging information - recompile for debugging",
662     VMsg("The image file has no debugging information.  You must recompile "
663          "the source code for this program with debugging information in "
664          "order to run the program under the debugger.") },
665 
666     { VMERR_BIGNUM_NO_REGS,
667     "out of temporary floating point registers (calculation too complex)",
668     VMsg("The interpreter is out of temporary floating point registers.  "
669          "This probably indicates that an excessively complex calculation "
670          "has been attempted.") }
671 
672 #endif /* VMERR_OMIT_MESSAGES */
673 };
674 
675 /* size of the english message array */
676 size_t vm_message_count_english =
677     sizeof(vm_messages_english)/sizeof(vm_messages_english[0]);
678 
679 /*
680  *   the actual message array - we'll initialize this to the
681  *   english list that's linked in, but if we find an external message
682  *   file, we'll use the external file instead
683  */
684 const err_msg_t *vm_messages = vm_messages_english;
685 
686 /* message count - initialize to the english message array count */
687 size_t vm_message_count =
688     sizeof(vm_messages_english)/sizeof(vm_messages_english[0]);
689 
690 /* ------------------------------------------------------------------------ */
691 /*
692  *   we don't need the VMsg() (verbose message) cover macro any more
693  */
694 #undef VMsg
695