(MESS) ti99: Added a new error message for RPK. (nw)
This commit is contained in:
parent
a0dcbbd11b
commit
baade3fe0c
@ -2202,7 +2202,11 @@ rpk_socket* rpk_reader::load_rom_resource(zip_file* zip, xml_data_node* rom_reso
|
||||
|
||||
// and unzip file from the zip file
|
||||
ziperr = zip_file_decompress(zip, contents, length);
|
||||
if (ziperr != ZIPERR_NONE) throw rpk_exception(RPK_ZIP_ERROR);
|
||||
if (ziperr != ZIPERR_NONE)
|
||||
{
|
||||
if (ziperr == ZIPERR_UNSUPPORTED) throw rpk_exception(RPK_ZIP_UNSUPPORTED);
|
||||
else throw rpk_exception(RPK_ZIP_ERROR);
|
||||
}
|
||||
|
||||
// check for sha1
|
||||
sha1 = xml_get_attribute_string(rom_resource_node, "sha1", NULL);
|
||||
@ -2341,7 +2345,11 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
|
||||
|
||||
/* uncompress the layout text */
|
||||
ziperr = zip_file_decompress(zipfile, layout_text, header->uncompressed_length);
|
||||
if (ziperr != ZIPERR_NONE) throw rpk_exception(RPK_ZIP_ERROR);
|
||||
if (ziperr != ZIPERR_NONE)
|
||||
{
|
||||
if (ziperr == ZIPERR_UNSUPPORTED) throw rpk_exception(RPK_ZIP_UNSUPPORTED);
|
||||
else throw rpk_exception(RPK_ZIP_ERROR);
|
||||
}
|
||||
|
||||
layout_text[header->uncompressed_length] = '\0'; // Null-terminate
|
||||
|
||||
|
@ -469,6 +469,7 @@ enum rpk_open_error
|
||||
RPK_XML_ERROR,
|
||||
RPK_INVALID_FILE_REF,
|
||||
RPK_ZIP_ERROR,
|
||||
RPK_ZIP_UNSUPPORTED,
|
||||
RPK_MISSING_RAM_LENGTH,
|
||||
RPK_INVALID_RAM_SPEC,
|
||||
RPK_UNKNOWN_RESOURCE_TYPE,
|
||||
@ -479,7 +480,7 @@ enum rpk_open_error
|
||||
RPK_UNKNOWN_PCB_TYPE
|
||||
};
|
||||
|
||||
static const char error_text[15][30] =
|
||||
static const char error_text[16][30] =
|
||||
{
|
||||
"No error",
|
||||
"Not a RPK (zip) file",
|
||||
@ -488,6 +489,7 @@ static const char error_text[15][30] =
|
||||
"XML format error",
|
||||
"Invalid file reference",
|
||||
"Zip file error",
|
||||
"Unsupported zip version",
|
||||
"Missing RAM length",
|
||||
"Invalid RAM specification",
|
||||
"Unknown resource type",
|
||||
|
Loading…
Reference in New Issue
Block a user