mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	A bit improved error reporting for checksum calculation.
This commit is contained in:
		| @@ -603,6 +603,7 @@ void CModHandler::loadModFilesystems() | ||||
| 		auto filesystem = genModFilesystem(modName, fsConfig); | ||||
|  | ||||
| 		CResourceHandler::get()->addLoader(filesystem, false); | ||||
| 		logGlobal->traceStream() << "Generating checksum for " << modName; | ||||
| 		ui32 newChecksum = calculateModChecksum(modName, filesystem); | ||||
| 		if (allMods[modName].checksum != newChecksum) | ||||
| 		{ | ||||
|   | ||||
| @@ -46,7 +46,7 @@ CArchiveLoader::CArchiveLoader(const std::string &mountPoint, const std::string | ||||
| 	{ | ||||
| 		throw std::runtime_error("LOD archive format unknown. Cannot deal with " + archive); | ||||
| 	} | ||||
| 	logGlobal->traceStream() << "Archive loaded, " << entries.size() << " files found"; | ||||
| 	logGlobal->traceStream() << ext << "Archive loaded, " << entries.size() << " files found"; | ||||
| } | ||||
|  | ||||
| void CArchiveLoader::initLODArchive(const std::string &mountPoint, CFileInputStream & fileStream) | ||||
| @@ -179,4 +179,4 @@ std::unordered_set<ResourceID> CArchiveLoader::getFilteredFiles(std::function<bo | ||||
| 			foundID.insert(file.first); | ||||
| 	} | ||||
| 	return foundID; | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -149,7 +149,10 @@ si64 CCompressedStream::readMore(ui8 *data, si64 size) | ||||
| 			endLoop = true; | ||||
| 			break; | ||||
| 		default: | ||||
| 			throw std::runtime_error("Decompression error!\n"); | ||||
| 			if (inflateState->msg == nullptr) | ||||
| 				throw std::runtime_error("Decompression error. Return code was " + boost::lexical_cast<std::string>(ret)); | ||||
| 			else | ||||
| 				throw std::runtime_error(std::string("Decompression error: ") + inflateState->msg); | ||||
| 		} | ||||
| 	} | ||||
| 	while (endLoop == false && inflateState->avail_out != 0 ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user