- for (auto& symlinkAssembly : bf::recursive_directory_iterator(tacDir)) {
- std::string symPath = symlinkAssembly.path().string();
- if (!isNativeImage(symPath)) {
- std::string originPath = bf::read_symlink(symPath).string();
- std::string originNiPath = originPath.substr(0, originPath.rfind(".dll")) + ".ni.dll";
- if (!bf::exists(originNiPath)) {
- if(createNiDll(originPath, false) != NI_ERROR_NONE) {
- _ERR("Failed to create NI file [%s]", originPath.c_str());
- return -1;
+ try {
+ for (auto& symlinkAssembly : bf::recursive_directory_iterator(tacDir)) {
+ std::string symPath = symlinkAssembly.path().string();
+ if (!isNativeImage(symPath)) {
+ std::string originPath = bf::read_symlink(symPath).string();
+ std::string originNiPath = originPath.substr(0, originPath.rfind(".dll")) + ".ni.dll";
+ if (!bf::exists(originNiPath)) {
+ if(createNiDll(originPath, false) != NI_ERROR_NONE) {
+ _ERR("Failed to create NI file [%s]", originPath.c_str());
+ return -1;
+ }