//-*-c++-*--------------------------------------------------------------
//  nsrError.cpp
//   Error messages.
//
//      Unpublished Confidential Information of Hewlett-Packard
//      Company. Do not disclose.  Copyright (c) Hewlett-Packard
//      Company 1995. All rights reserved
// 
// The contents of this software are proprietary and confidential to
// the Hewlett- Packard Company, and are limited in distribution to
// those with a direct need to know.  Individuals having access to
// this software are responsible for maintaining the confidentiality
// of the content and for keeping the software secure when not in use.
// Transfer to any party is strictly forbidden other than as expressly
// permitted in writing by Hewlett-Packard Company.  Unauthorized
// transfer to or possession by any unauthorized party may be a
// criminal offense.
//
//                  RESTRICTED RIGHTS LEGEND
//
//      Use,  duplication,  or disclosure by the U. S. Government is
//      subject to restrictions as set forth in subparagraph (c) (1)
//      (ii) in the Rights in Technical Data and Computer Software
//      clause in DFARS 252.227-7013 or any other successor clause.
//
//                      HEWLETT-PACKARD COMPANY
//                      3000 Hanover St.
//                      Palo Alto, CA  94304 U.S.A.
//
//      Rights for non-DOD U.S. Government Departments and Agencies
//      are as set forth in FAR 52.227-19 (c) (1,2) or any other
//      successor clause.
//
//  CLASSES:
//   Error
//  
//----------------------------------------------------------------------
//
// $Source: /projects/HMS/nsr/udfCore/sys/nsrError.cpp,v $
// $Revision: 1.75 $    $Author: hmgr $
// $State: Exp $        $Locker:  $
// $Date: 96/06/27 02:58:15 $

#include "nsrLib.h"

static struct NSR::errorTableItem errorTable[] = {

    { NSR::error_None, "No error" },
    { NSR::error_No_free_store, "Unable to allocate free store" },
    { NSR::error_Bad_ICB_table, "Error in ICB table" },
    { NSR::error_Bad_volume_label, "Error in NSR volume label" },
    { NSR::error_Bad_tag_checksum, "Invalid Descriptor Tag (checksum)" },
    { NSR::error_Bad_tag_location, "Invalid Descriptor Tag (location)" },
    { NSR::error_Bad_tag_descriptor_version, "Invalid Descriptor Tag (descrVersion)" },
    { NSR::error_Bad_descr_CRC, "Tag CRC does not match calculated CRC" },
    { NSR::error_Bad_tag_descriptor_type, "Improper descriptor in sequence" },
    { NSR::error_UnrecognizedIUVolDesc, "Could not recognize the IUVD" },

    { NSR::error_Unknown_path_component, "Path component is unknown" },
    { NSR::error_Empty_path_element, "Path component is empty" },
    { NSR::error_Drive_read, "Error reading from drive" },
    { NSR::error_Drive_write, "Error writing to drive" },
    { NSR::error_Drive_load, "Error loading cartridge" },
    { NSR::error_Invalid_LBN, "Invalid logical block number" },
    { NSR::error_Invalid_sector, "Invalid logical sector" },
    { NSR::error_Invalid_volume, "Invalid logical volume" },
    { NSR::error_Wrong_volume_set, "Does not belong to volume set" },
    { NSR::error_Directory_not_found, "Directory was not found" },

    { NSR::error_File_not_found, "File was not found" },
    { NSR::error_Not_root_volume, "Volume is not a root" },
    { NSR::error_Name_not_unique, "Filename is not unique" },
    { NSR::error_No_free_space, "Unable to allocate free space" },
    { NSR::error_Directory_dirty, "The directory is still dirty" },
    { NSR::error_Missing_volume, "Volume set is missing a Volume" },
    { NSR::error_Invalid_function, "An invalid function was called" },
    { NSR::error_End_of_ICB_table, "The end of the ICB table has been reached" },
    { NSR::error_End_of_directory, "Attempted to read past the end of the directory" },
    { NSR::error_Index_out_of_bounds, "The index is out of bounds" },

    { NSR::error_Volume_set_integrity_open,  "The volume set integrity is open" },
    { NSR::error_Volume_set_integrity_closed,  "The volume set integrity is closed" },
    { NSR::error_Improper_file_type, "Improper file type for function" },
    { NSR::error_Invalid_extentlist, "An invalid extentlist passed as an argument" },
    { NSR::error_Invalid_pathelementlist,"An invalid pathelementlist passed as an argument" },

    { NSR::error_Non_UDF_volume_set, "Volume set is not UDF" },
    { NSR::error_UDF_volume_set_not_supported, "UDF implementation not supported by this implementation" },
    { NSR::error_VDS_mirror_bad, "Main and Reserve Volume Descriptor Sequences do not match" },
    { NSR::error_Empty_volume_set, "Volume Set is Empty" },
    { NSR::error_Bad_volume_recog_sequence, "Volume Recognition Sequence is bad" },
    { NSR::error_No_room_in_VDS, "Volume Descriptor Sequence ran out of room" },

    { NSR::error_Invalid_ICB_table, "ICBTable is invalid" },
    { NSR::error_Wrong_FSDS_extent_length, "Bad File Set Descriptor Sequence Length" },
    { NSR::error_End_of_Sequence_space, "No space for sequence" },
    { NSR::error_End_of_buffer, "End of buffer found" },
    { NSR::error_Unexpected_EA_icb, "Unexpected Extended Attribute ICB in table" },

    { NSR::error_Null_pointer, "Object or contained obj contains null ptr, or you passed a null ptr to method" },
    { NSR::error_Root_EA_FileEntry_full, "Root EA FileEntry is full" },
    { NSR::error_Root_not_found, "Root volume not found" },
    { NSR::error_Invalid_labelLimit, "addUnlabeledVolume: labelLimit too small" },
    { NSR::error_Invalid_number_of_volumes, "Invalid number of volumes" },
    { NSR::error_Protected_logical_volume, "Protected logical volume" }, 
    { NSR::error_Cant_change_hard_writeProtect, "Cannot change hard write-protected logical volume" }, 
    { NSR::error_WORM_file_sets_not_protected, "WORM file set not protected" },
    { NSR::error_Protected_file_set, "Protected file set" },
    { NSR::error_File_set_not_found, "File set not found" },

    { NSR::error_Wrong_block_size_in_LVD, "Logical Volume Descriptor has wrong block size" },
    { NSR::error_Too_many_file_sets, "Too many file sets found" },
    { NSR::error_Cant_overwrite_file_set, "Cannot overwrite file set" },
    { NSR::error_Wrong_sector_size, "Wrong sector size for volume set" },
    { NSR::error_Wrong_media_type, "Wrong media type for volume set" },
    { NSR::error_Volume_already_labeled, "Volume already labeled" },
    { NSR::error_Volume_not_labeled, "Volume not labeled" },
    { NSR::error_Duplicate_volume_number, "Same Volume number already in volume set" },

    { NSR::error_Invalid_function_for_media, "Invalid function for current media type" },
    { NSR::error_Invalid_parameter_for_media, "Invalid parameter for current media type" },
    { NSR::error_Invalid_surface_id, "Invalid surface identifier" },

    { NSR::error_FileEntry_full, "FileEntry is full" },
    { NSR::error_AllocExtentDesc_full, "AllocExtentDesc is full" },
    { NSR::error_UnallocatedSpaceEntry_full, "UnallocatedSpaceEntry is full" },
    { NSR::error_Required_object_not_present, "Required Object is not present" },

#ifdef NSR_VERIFY 
    { NSR::error_VerifyTag, "Verify failed in Tag" },
    { NSR::error_VerifyIUVD, "Verify failed in ImplementUseVolumeDesc" },
    { NSR::error_VerifyAVD, "Verify failed in AnchorVolumeDesc" },
    { NSR::error_VerifyPVD, "Verify failed in PrimaryVolumeDesc" },
    { NSR::error_VerifyPD, "Verify failed in PartitionDesc" },
    { NSR::error_VerifyLVD, "Verify failed in LogicalVolumeDesc" },
    { NSR::error_VerifyUSD, "Verify failed in UnallocatedSpaceDesc" },
    { NSR::error_VerifyFSD, "Verify failed in FileSetDesc" },
    { NSR::error_VerifyLVID, "Verify failed in LogicalVolumeIntegrityDesc" },
    { NSR::error_VerifyFE, "Verify failed in FileEntry" },

    { NSR::error_VerifyAED, "Verify failed in AllocExtentDesc" },
    { NSR::error_VerifyIE, "Verify failed in IndirectEntry" },
    { NSR::error_VerifyTE, "Verify failed in TerminalEntry" },
    { NSR::error_VerifyFID, "Verify failed in FileIdentifierDesc" },
    { NSR::error_VerifyUSE, "Verify failed in UnallocatedSpaceEntry" },
    { NSR::error_VerifySBD, "Verify failed in SpaceBitmapDesc" },
    { NSR::error_VerifyPC, "Verify failed in PathComponent" },
    { NSR::error_VerifyEAHD, "Verify failed in ExtendedAttrHeaderDesc" },

// ISO EAs
    { NSR::error_VerifyFileTimesEA, "Verify failed in ISO-FileTimesEA" },

// UDF EAs
    { NSR::error_VerifyFreeEASpaceEA, "Verify failed in UDF-FreeEASpaceEA" },

// UDF / OS2
    { NSR::error_VerifyOS2EA, "Verify failed in UDF-OS2EA" },
    { NSR::error_VerifyOS2EALengthEA, "Verify failed in UDF-OS2EALengthEA" },
                                          
// UDF / Mac
    { NSR::error_VerifyMacVolumeInfoEA, "Verify failed in UDF-MacVolumeInfoEA" },
    { NSR::error_VerifyMacDirFinderInfoEA, "Verify failed in UDF-MacDirFinderInfoEA" },
    { NSR::error_VerifyMacFileFinderInfoEA, "Verify failed in UDF-MacFileFinderInfoEA" },
    { NSR::error_VerifyMacUniqueIDTableEA, "Verify failed in UDF-MacUniqueIDTableEA" },
    { NSR::error_VerifyMacResourceForkEA, "Verify failed in UDF-MacResourceForkEA" },

// HP EAs
// HP / Novell
    { NSR::error_VerifyNovellAttrEA, "Verify failed in EA: NovellAttrEA" },
    { NSR::error_VerifyNovellTrusteeEA, "Verify failed in EA: NovellTrusteeEA" },
// HP / Archive
    { NSR::error_VerifyICBTableEA, "Verify failed in EA: ICBTable" },
#endif 

// Error codes for bad input parameters.
    { NSR::error_Bad_Parameter_Extent, "Extent parameter is in Error state"},
    { NSR::error_Bad_Parameter_Extent_List, "ExtentList parameter is in Error state"},
    { NSR::error_Bad_Parameter_EA_List, "EAList parameter is in Error state"},
    { NSR::error_Bad_Parameter_Byte_Array, "ByteArray parameter is in Error state"},
    { NSR::error_Bad_Parameter_File_Entry, "FileEntry parameter is in Error state"},
    { NSR::error_Bad_Parameter_ADTable, "ADTable parameter is in Error state"},
    { NSR::error_Bad_Parameter_Space_Resource, "SpaceResource parameter is in Error state"},
    { NSR::error_Bad_Parameter_EASpace, "EASpace parameter is in Error state"},

// Error codes for invalid SSVolume objects 
    { NSR::error_DriveDevice_invalid, "Invalid DriveDevice" },
    { NSR::error_PhysicalVolume_invalid, "Invalid PhysicalVolume" },
    { NSR::error_Partition_invalid, "Invalid Partition" },
    { NSR::error_LogicalVolume_invalid, "Invalid LogicalVolume" },
    { NSR::error_FileSet_invalid, "Invalid FileSet" },

//  NSRExt 
    { NSR::error_PE_beyond_physical_volume, "PhysExtent exceeds PhysicalVolume limits" },
    { NSR::error_LE_beyond_partition, "LogExtent exceeds Partition limits" },
    { NSR::error_InfoLen_illegal, "LogExtent illegal InfoLen" },
    { NSR::error_Invalid_write_length, "LogExtent write length invalid" },
    { NSR::error_Cant_write_imaginary_extent, "LogExtent: can't write imaginary extent" },
    { NSR::error_Cant_grow_null_extent, "LogExtent: can't grow null extent" },

//  NSRDir 
    { NSR::error_DIR_Bad_dir_extent_type, "Directory extent type is not Recorded but should be" },
    { NSR::error_DIR_Parent_and_not_dir, "Directory entry is marked Parent yet not marked Directory" },
    { NSR::error_DIR_null_DirEntry, "Directory entry is null.  That is, its ICBAddr.infoLen is zero." },

// NSRNode 
    { NSR::error_NODE_Bad_AD_type_in_icbtag, "Bad alloc descr type in FileEntry" },
    { NSR::error_NODE_InfoLen_mismatch, "InfoLen mismatch in ADTable in FileEntry" },
    { NSR::error_NODE_LogBlocksRecorded_mismatch, "LogBlocksRecorded in ADTable in FileEntry" },
    { NSR::error_NODE_State_Violation, "Node is in state violation" },
    { NSR::error_NODE_AED_Read_Failure, "Failure reading AED from the surface" },
    { NSR::error_NODE_Bad_Continuation_Extent, "Failure reading AED from the surface" },

    { NSR::error_NODE_EmbeddedEASpace_Not_Multiple_4, "The embedded EA space is not a four byte multiple." },
    { NSR::error_NODE_Embedded_Data_Set, "Node has embedded data, but can't with this ADType." },
    { NSR::error_NODE_ADs_Set, "Node has body or tail, but can't with this ADType." },
    { NSR::error_NODE_No_Unique_ID, "Node has UniqueID of zero, but is not a Root Directory." },
    { NSR::error_NODE_Descriptor_Overflow, "Node can't fit embedded EASpace and embedded data/ADs in one descriptor block." },

    { NSR::error_EANODE_EANodeAddr_Set, "Node is an EANode, but EANodeAddr is set (not allowed)." },
    { NSR::error_EANODE_Embedded_EASpace_Set, "Node is an EANode, but embeddedData_ is set (not allowed)." },
    { NSR::error_EANODE_Linkcount_Set, "Node is an EANode, but linkcount_ is set (not allowed)." },

// SSVol 
    { NSR::error_SSVOL_Desc_too_long, "Descriptor too long" },
    { NSR::error_SSVOL_Illegal_desc_in_VDS, "Illegal descriptor in VDS" },
    { NSR::error_SSVOL_No_LVD_before_PD_yet, "Cannot handle LVD before PD yet" },
    { NSR::error_SSVOL_No_multiple_VDS_extents_yet, "Multiple VDS extents not yet implemented" },
    { NSR::error_SSVOL_Unknown_desc_in_VDS, "Unknown descriptor in VDS" },
    { NSR::error_SSVOL_No_disk_initialization_yet, "Disk initialization not supported yet" },

// Partition 
    { NSR::error_PART_Both_space_bitmap_and_table, "Partition: Same SpaceResource has SpaceTable and SpaceBitmap" },
    { NSR::error_PART_Mixed_space_tables_and_bitmaps, "Partition: Mixed SpaceResource types found" },
    { NSR::error_PART_No_extent_for_SpaceResource, "Partition: No extent allocated for SpaceResource" },

// SpaceResource
    { NSR::error_SR_No_Bitmap_support_yet, "SpaceResource: Bitmaps not yet supported" },
    { NSR::error_SR_Feature_not_implemented, "SpaceResource: Unimplemented feature" },
    { NSR::error_SR_Incorrect_logical_volume, "SpaceResource: Tried to initialize with space from wrong LogicalVolume" },
    { NSR::error_SR_Incompatible_extent_type, "SpaceResource: Incompatible extent type" },
    { NSR::error_SR_Extent_from_wrong_logVolume, "SpaceResource: Extent from wrong logical volume" },
    { NSR::error_SR_Cannot_mix_space_types, "SpaceResource: Extent type mixing not allowed" },
    { NSR::error_SR_has_no_descriptor_space, "SpaceResource: PartitionDesc has no SR locations" },
    { NSR::error_SR_Debug_code, "SpaceResource: Compiled with TEST_SR_BITMAP defined" },
    { NSR::error_SR_Bad_partition, "SpaceResource: Partition is not valid" },
    { NSR::error_SR_Bad_volume, "SpaceResource: Logical volume is not valid" },
    { NSR::error_SR_Bad_descriptor, "SpaceResource: Descriptor header is not valid" },
    { NSR::error_SR_Bad_type, "SpaceResource: Invalid space resource type" },
    { NSR::error_SR_Bitmap_read, "SpaceResource: Error while reading bitmap page" },
    { NSR::error_SR_Bitmap_write, "SpaceResource: Error while writing bitmap page" },
    { NSR::error_SR_Bitmap_corrupt, "SpaceResource: Bitmap data does not match meta-data" },
    { NSR::error_SR_Insufficient_space, "SpaceResource: Could not satisfy allocation request" },
    { NSR::error_SR_Page_overrun, "SpaceResource: Attempt to access data past end of page buffer" },
    { NSR::error_SR_Bad_extent_length, "SpaceResource: Reqested extent size is too large" },
    { NSR::error_SR_Bitmap_too_large, "SpaceResource: Bitmap is too large for paged bitmap manager" },
    { NSR::error_SR_Incomplete, "SpaceResource: Space resource object is not complete" },
    { NSR::error_SR_Bad_extent, "SpaceResource: Invalid extent" },
    { NSR::error_SR_Cannot_free_space, "SpaceResource: Cannot deallocate space because it is already free" },
    { NSR::error_SR_No_valid_space_resource, "SpaceResource: The master does not contain a vaild space resource" },

// ExtendedAttributes
    { NSR::error_EA_Bad_file_times_type, "EAttrs: Found non-creation time in FileTimesEA" },
    { NSR::error_EA_No_imaginary_SmallADs, "EAttrs: SmallADs cannot hold Imaginary Extents" },
    { NSR::error_EA_Not_found, "EAttrs: ExtendedAttribute not found" },
    { NSR::error_EA_Unknown_EA_type, "EAttrs: Unknown ExtendedAttribute Type" },
    { NSR::error_EA_Invalid_EA_type, "EAttrs: Invalid ExtendedAttribute Type" },
    { NSR::error_EA_Invalid_EA_subtype, "EAttrs: Invalid ExtendedAttribute SubType" },
    { NSR::error_EA_Invalid_EA_length, "EAttrs: Invalid ExtendedAttribute Length" },
    { NSR::error_EA_Bad_checksum, "EAttrs: Invalid ExtendedAttribute Checksum" },
    { NSR::error_EA_Invalid_EA_in_src_LEL, "EAttrs: Invalid ExtendedAttribute in source ExtentList" },
    { NSR::error_EA_Invalid_EA_in_src_BA, "EAttrs: Invalid ExtendedAttribute in source ByteArray" },
    { NSR::error_EA_Invalid_multiple_occurences_of_EA, "EAttrs: Only one of this type ExtendedAttribute allowed" },
    { NSR::error_EA_Invalid_EA_placement, "EAttrs: This type EA not allowed in embedded/external EASpace" },
    { NSR::error_EA_Invalid_empty_EA_list, "EAttrs: Unexpectedly empty ExtendedAttribute list" },
    { NSR::error_EA_Invalid_EA_ordering, "EAttrs: Invalid ordering of ExtendedAttributes" },
    { NSR::error_EA_Invalid_EA_padding, "EAttrs: ExtendedAttributes not padded correctly" },
    { NSR::error_EA_Invalid_offset_in_EA_header, "EAttrs: Offset in ExtendedAttribute header not valid" },
    { NSR::error_EA_Invalid_call, "EAttrs: An invalid call was made" },

// Extended Attribute Registry
    { NSR::error_REGISTRY_Invalid_key, "EA Registry: Invalid registry key" },
    { NSR::error_REGISTRY_Duplicate_key, "EA Registry: Key already exists in registry" },
    { NSR::error_REGISTRY_Entry_not_found, "EA Registry: Entry not found" },

#ifdef TRUSTEES 
// Trustees
    { NSR::error_TrusteeRename_invalid, "Unable to rename a trustee entry from rid to filename" },
    { NSR::error_TrusteeCreate_fail, "Unable to create the trustee file" },
    { NSR::error_TrusteeWrite_fail, "Unable to write the trustee file" },
    { NSR::error_TrusteeAlloc_fail, "Unable to allocate elements for trustee" },
    { NSR::error_TrusteeOpen_fail, "Unable to open the trustee file" },
    { NSR::error_TrusteeRead_fail, "Unable to read the trustee file" },
    { NSR::error_TrusteeTerm_fail, "Unable to find terminator in trustee file" },
    { NSR::error_TrusteeSeqErr, "Sequence Error in TrusteeList usage" },
    { NSR::error_TrusteeDirOpen_fail, "Unable to open the trustee directory" },
#endif // TRUSTEES

    // DriveDevice 

    { NSR::error_Capacity_failed, "Read capacity on disk device failed" },
    { NSR::error_Drive_blank_check, "Attempted to read a blank sector" },
    { NSR::error_Read_EOM, "Attempted to read past physical EOM on disk device" },
    { NSR::error_Read_EOLM, "Attempted to read past logical EOM on disk device" },
    { NSR::error_Write_EOM, "Attempted to write past physical EOM on disk device" },
    { NSR::error_Write_EOLM, "Attempted to write past logical EOM on disk device" },
    { NSR::error_Erase_failed, "Erase failed due to I/O error" },
    { NSR::error_Bad_erase_size, "Erase failed due to bad Extent size" },
    { NSR::error_Set_verify_failed, "Drive device:  set verify failed" },

    // hpACDevice

    { NSR::error_Elt_addresses_failed, "Element addresses (mode sense) failed" },
    { NSR::error_Element_status_failed,"Element status failed" },
    { NSR::error_Transport_element_full,"Transport full, operator intervention requireed"},
    { NSR::error_Invalid_sid,"Invalid surface identifier specified" },
    { NSR::error_Drive_not_available,"Drive resource not available" },
    { NSR::error_Move_failed,"Move operation failed" },
    { NSR::error_Exchange_failed,"Exchange operation failed" },
    { NSR::error_Argument_not_found,"Argument not found in table" },
    { NSR::error_Slot_empty,"Autochanger slot empty" },
    { NSR::error_Passthru_ioctl_failed,"Passthru ioctl failed" },

    { NSR::error_Cant_make_disk_device_file,"Unable to make disk device file" },
    { NSR::error_Surface_in_use,"Surface is in use (drive allocated)" },
    { NSR::error_Autochanger_not_ready,"Autochanger not ready (not responding)" },
    { NSR::error_Autochanger_not_supported,"Autochanger is not supported" },
    { NSR::error_All_drives_spared,"All drives in autochanger are spared" },

    // The following section is reserved for 3rd party applications

#ifdef _THIRD_PARTY_ERROR_CODES_

    { NSR::error_Null_acrc_file,"No acrc file specified"},
    { NSR::error_Cannot_access_acrc_file,"Cannot open acrc file for read"},
    { NSR::error_Syntax_error_in_acrc_file,"Syntax error in acrc file"},
    { NSR::error_Cannot_stat_acrc_file,"Stat(2) failed on acrc file"},
    { NSR::error_Bad_AC_device_file,"Bad autochanger device file in acrc file"},
    { NSR::error_Null_status_file,"No status file specified"},
    { NSR::error_Cannot_access_status_file,"Cannot open status file for read"},
    { NSR::error_Status_file_syntax_error,"Syntax error in status file"},
    { NSR::error_Invalid_surface,"Bad surface specified"},
    { NSR::error_Null_volume_set_name,"Null volume set name"},

    { NSR::error_Name_not_found,"Name not found"},
    { NSR::error_No_working_volume_set,"No working volume set"},
    { NSR::error_No_free_volume,"No free volume"},
    { NSR::error_Unknown_fileset_name,"Unknown fileset name"},
    { NSR::error_Null_volume_name,"Null volume name"},
    { NSR::error_Invalid_operation,"Operation not allowed or possible"},
    { NSR::error_No_freespace_information,"No freespace info specified"},

#endif  // _THIRD_PARTY_ERROR_CODES_

    // This absolutely must be the last entry in this table !!!!!
    // It acts like a sentinal in the algorithm to find the error message.
    { NSR::error_Unknown, "An unknown error occurred" },
};

//----------------------------------------------------------------------
// METHOD: Error::message                  --JD,AP
//      
//  Returns a const CHAR_PTR to the an Ascii representation of current
//  value.
//
// ARGS: none.
//
// RETURNS:
//  CONST_CHAR_PTR to message.
// 
// PRE-CONDITIONS: none.
// 
// POST-CONDITIONS: none.
// 
// ERRORS: none.
// 
// NOTES:
//  This performs a lookup into a table associating error messages to
//  error values (see ErrorCodeType). If the value does not have an
//  entry in the table, the string indicates this as well, with:
//
//    "An unknown error occurred"
//
//  If this happens, it is most likely that there is an inconsistency
//  between the sys/nsrError.h and sys/nsrError.cpp files.
//
//----------------------------------------------------------------------
NSR::CONST_CHAR_PTR
NSR::Error::message() const
{
    UINT32 idx = 0;
    while ( errorTable[idx].error != errorCode && errorTable[idx].error != error_Unknown )
    {
        idx++;
    }
    return errorTable[idx].errorMessage;
}
