mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-27 00:41:08 +02:00
Throw std::runtime_exception instead of a pointer to new one
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
This commit is contained in:
@ -88,5 +88,5 @@ void MapServiceMock::addToArchive(CZipSaver & saver, const JsonNode & data, cons
|
||||
std::unique_ptr<COutputStream> stream = saver.addFile(filename);
|
||||
|
||||
if(stream->write((const ui8*)s.c_str(), s.size()) != s.size())
|
||||
throw new std::runtime_error("addToArchive: zip compression failed.");
|
||||
throw std::runtime_error("addToArchive: zip compression failed.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user