增加错误报警
This commit is contained in:
@@ -120,7 +120,10 @@ public:
|
||||
|
||||
if (res1 == true && res2 == true && res3 == true) {
|
||||
emit bridge->loadingWindow_appendInitLog("初始化Mission中...", "yellow");
|
||||
_missionLoader.loadMission(missionJson["missionDllPath"]);
|
||||
bool res = _missionLoader.loadMission(missionJson["missionDllPath"]);
|
||||
if (res == false) {
|
||||
emit bridge->loadingWindow_appendInitLog("初始化Mission失败!请检查路径是否正确.", "red");
|
||||
}
|
||||
_missionLoader.getmission(missionJson["missionDllPath"])->initBasic(
|
||||
&_serviceManager,
|
||||
missionJson["missionSettings"], bridge
|
||||
|
||||
@@ -7,7 +7,7 @@ class MissionLoader {
|
||||
bool loadMission(const std::string& missionPath) {
|
||||
hDlls[missionPath] = LoadLibrary(missionPath.c_str());
|
||||
if (!hDlls[missionPath]) {
|
||||
std::cerr << "Failed to load DLL!" << std::endl;
|
||||
std::cerr << "Failed to load Misson DLL!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
createMissionFunc createMission = (createMissionFunc)GetProcAddress(hDlls[missionPath], "createMission");
|
||||
@@ -17,7 +17,7 @@ class MissionLoader {
|
||||
missionMap[missionPath] = createMission();
|
||||
}
|
||||
else {
|
||||
std::cerr << "Failed to get function pointers!" << std::endl;
|
||||
std::cerr << "Failed to get Misson function pointers!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -16,6 +16,11 @@ void appConfig::parsingSettingJson()
|
||||
loginPassWord = settingJson["loginPassWord"];
|
||||
|
||||
missionJson = readOrderedJsonFromPath(appWorkPath.string() + "/config/" + objectSelect +".json");
|
||||
if(QFile(QString::fromStdString(missionJson)).exists() == false){
|
||||
std::cout << "Mission config file not found: " << (appWorkPath.string() + "/config/" + objectSelect +".json") << std::endl;
|
||||
std::cout << "任务配置文件未找到: " << (appWorkPath.string() + "/config/" + objectSelect +".json") << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
softwareTile = missionJson["softwareTile"];
|
||||
imgSavePath = missionJson["backend"]["imgSaveBasePath"];
|
||||
//viewer
|
||||
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
json = jsonIn;
|
||||
hDll = LoadLibrary("core.dll");
|
||||
if (!hDll) {
|
||||
std::cerr << "Failed to load DLL!" << std::endl;
|
||||
return false;
|
||||
std::cerr << "Failed to load Core DLL!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
CreateBackend = (CreateBackendFunc)GetProcAddress(hDll, "CreateBackend");
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
backend = CreateBackend();
|
||||
}
|
||||
else {
|
||||
std::cerr << "Failed to get function pointers!" << std::endl;
|
||||
return false;
|
||||
std::cerr << "Failed to get Core function pointers!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
backend->init(db,bridgeIn, jsonIn);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user