fix: Add trigger StopScanProcess event while start scan failed.
This commit is contained in:
@@ -824,9 +824,10 @@ bool DeviceManager::startFullScan(const QString& aPatientInfo)
|
|||||||
DmsSyncActionResult result = mFullScanAction->execute();
|
DmsSyncActionResult result = mFullScanAction->execute();
|
||||||
if(!result.mIsSucessful)
|
if(!result.mIsSucessful)
|
||||||
{
|
{
|
||||||
QString message = QString("Dms connection error. Reason:%1").arg(result.mData);
|
QString message = tr("Start scan failed. Reason:time out.");
|
||||||
THROW_ERROR(message);
|
THROW_ERROR(message);
|
||||||
LOG_SYS_OPERATION("Start full scan failed. " + message)
|
LOG_SYS_OPERATION("Start full scan failed. " + message);
|
||||||
|
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,8 +836,9 @@ bool DeviceManager::startFullScan(const QString& aPatientInfo)
|
|||||||
if(code != 0)
|
if(code != 0)
|
||||||
{
|
{
|
||||||
QString msg = jsonObj["info"].toString();
|
QString msg = jsonObj["info"].toString();
|
||||||
LOG_SYS_OPERATION("Start full scan failed. " + msg)
|
LOG_SYS_OPERATION("Start full scan failed. " + msg);
|
||||||
THROW_ERROR(msg);
|
THROW_ERROR(msg);
|
||||||
|
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
mCurrentScanMeasurementID = jsonObj["measurement id"].toString();
|
mCurrentScanMeasurementID = jsonObj["measurement id"].toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user