Skip to content

Commit

Permalink
Merge pull request #18 from Laupetin/fix/abort-linking-on-load-error
Browse files Browse the repository at this point in the history
Abort linking on load error
  • Loading branch information
Laupetin authored Oct 5, 2023
2 parents cb4f23c + e7f52e5 commit 7850166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Linker/Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,22 +536,22 @@ class Linker::Impl
{
if (!fs::is_regular_file(zonePath))
{
printf("Could not find file \"%s\".\n", zonePath.c_str());
continue;
std::cout << "Could not find zone file to load \"" << zonePath << "\".\n";
return false;
}

auto absoluteZoneDirectory = absolute(std::filesystem::path(zonePath).remove_filename()).string();

auto zone = std::unique_ptr<Zone>(ZoneLoading::LoadZone(zonePath));
if (zone == nullptr)
{
printf("Failed to load zone \"%s\".\n", zonePath.c_str());
std::cout << "Failed to load zone \"" << zonePath << "\".\n";
return false;
}

if (m_args.m_verbose)
{
printf("Loaded zone \"%s\"\n", zone->m_name.c_str());
std::cout << "Load zone \"" << zone->m_name << "\"\n";
}

m_loaded_zones.emplace_back(std::move(zone));
Expand Down
2 changes: 1 addition & 1 deletion src/ObjLoading/AssetLoading/AssetLoadingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ XAssetInfoGeneric* AssetLoadingManager::LoadIgnoredDependency(const asset_type_t
return lastDependency;
}

std::cout << "Failed to create empty asset for type \"" << m_context.m_zone->m_pools->GetAssetTypeName(assetType) << "\"" << std::endl;
std::cout << "Failed to create empty asset \"" << assetName << "\" for type \"" << m_context.m_zone->m_pools->GetAssetTypeName(assetType) << "\"" << std::endl;
return nullptr;
}

Expand Down

0 comments on commit 7850166

Please sign in to comment.