mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
ObjLoading: Display error message on directory_iterator throwing an exception
This commit is contained in:
parent
10342a7b58
commit
b8c2557482
@ -25,7 +25,10 @@ FileAPI::IFile* SearchPathFilesystem::Open(const std::string& fileName)
|
|||||||
return nullptr;
|
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)
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user