Ref T710 Propagate libxplanemp CSL load error messages as swift validation errors.

This commit is contained in:
Mat Sutcliffe
2019-07-29 22:08:39 +01:00
parent 5b5e139d10
commit b36172437b
5 changed files with 13 additions and 9 deletions

View File

@@ -226,7 +226,7 @@ namespace XSwiftBus
return def;
}
bool CTraffic::loadPlanesPackage(const std::string &path)
std::string CTraffic::loadPlanesPackage(const std::string &path)
{
initXPlanePath();
auto dir = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xswiftbus" + g_sep + "LegacyData" + g_sep;
@@ -234,8 +234,8 @@ namespace XSwiftBus
std::string related = dir + "related.txt";
std::string doc8643 = dir + "Doc8643.txt";
auto err = XPMPLoadCSLPackage(path.c_str(), related.c_str(), doc8643.c_str());
if (*err) { return false; }
return true;
if (*err) { return err; }
return {};
}
void CTraffic::setDefaultIcao(const std::string &defaultIcao)