ObjLoading: Display error message on directory_iterator throwing an exception

This commit is contained in:
Jan 2020-02-04 19:44:56 +01:00
parent 10342a7b58
commit b8c2557482

View File

@ -25,7 +25,10 @@ FileAPI::IFile* SearchPathFilesystem::Open(const std::string& fileName)
return nullptr;
}
void SearchPathFilesystem::Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback)
void SearchPathFilesystem::Find(const SearchPathSearchOptions& options,
const std::function<void(const std::string&)>& callback)
{
try
{
if (options.m_should_include_subdirectories)
{
@ -50,3 +53,8 @@ void SearchPathFilesystem::Find(const SearchPathSearchOptions& options, const st
}
}
}
catch (std::filesystem::filesystem_error& e)
{
printf("Directory Iterator threw error when trying to find files: \"%s\"\n", e.what());
}
}