Because NlsMessageCatalog is intended for use at runtime and debugging facilities might not be available, error codes are employed to provide an error tracing mechanism. The value of the current error code should be examined after each operation to determine if an error occurred during the last operation. Alternatively, the hasErrorOccurred message can be used to check if an error occurred during the last operation.The following list includes all error codes and their corresponding messages. Each error code is associated with a descriptive error string and an error object, which is typically related to the current error or the cause of the current error. This error object can be obtained by sending the currentErrorObject message to an instance of NlsMessageCatalog. Similarly, the descriptive error string can be obtained by sending the currentErrorString to an instance of NlsMessageCatalog. The interpretation of the error object for each error is provided below.Error object: nilError string: 'Error renaming file. Ensure file name is valid and no old working files exist.'
Error object:
Array
with: name of file being renamed
with: name of rename target
with: CfsError resulting from failed attempt to rename file.Error string: 'Error removing secondary working file.'
Error object:
Array
with: name of secondary working file
with: CfsError resulting from failed attempt to rename file.Error object: An instance of NlsMessageCatalogHeader.Error string: 'File write error.'
Error object:
Array
with: an instance of NlsMessageCatalogHeader
with: number of bytes that should have been written
with: number of bytes actually writtenError object: An instance of NlsMessageCatalogHeader.Error object: An instance of ObjectLoader.Error object: An instance of ObjectDumper.The NlsMessageCatalog function described in the previous sections is partitioned between the applications NlsExternalizationRuntime and NlsExternalizationTools to support packaging.NlsExternalizationRuntime provides the necessary class definitions for NlsMessageCatalog, its support classes, and all protocols required for reading and querying message catalog files. NlsExternalizationTools defines extensions to the basic NlsMessageCatalog and its support classes to enable creation of message catalog files. If the application being packaged has no requirement to create message catalog files at runtime, only the NlsExternalizationRuntime application should be included in the packaged image.The NlsExternalizationTools application also defines the RCConverter class that assists in converting localized message dictionaries to Microsoft Windows resource file formats. The RCConverter class is intended primarily for use in a development image and should most likely be excluded from a runtime image.
|