1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00

Catch filesystem exceptions

This commit is contained in:
Andrei Kortunov 2023-07-31 15:21:10 +04:00
parent 1ae2a994f0
commit c50769c8c5

View file

@ -178,12 +178,21 @@ int main(int argc, char** argv)
{
vfs = std::make_unique<VFS::Manager>();
for (const std::filesystem::path& path : archives)
{
try
{
if (auto archive = makeArchive(path))
vfs->addArchive(std::move(archive));
else
std::cerr << '"' << path << "\" is unsupported archive" << std::endl;
vfs->buildIndex();
}
catch (std::exception& e)
{
std::cerr << "ERROR, an exception has occurred: " << e.what() << std::endl;
}
}
}
// std::cout << "Reading Files" << std::endl;
for (const auto& path : files)