mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 19:21:04 +00:00
Catch filesystem exceptions
This commit is contained in:
parent
1ae2a994f0
commit
c50769c8c5
@ -178,11 +178,20 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
vfs = std::make_unique<VFS::Manager>();
|
vfs = std::make_unique<VFS::Manager>();
|
||||||
for (const std::filesystem::path& path : archives)
|
for (const std::filesystem::path& path : archives)
|
||||||
if (auto archive = makeArchive(path))
|
{
|
||||||
vfs->addArchive(std::move(archive));
|
try
|
||||||
else
|
{
|
||||||
std::cerr << '"' << path << "\" is unsupported archive" << std::endl;
|
if (auto archive = makeArchive(path))
|
||||||
vfs->buildIndex();
|
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;
|
// std::cout << "Reading Files" << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user