Handled errors in TargetReset event handler (in the InsightWorker)

This commit is contained in:
Nav
2022-05-01 21:17:55 +01:00
parent 07de0931b3
commit f5170fd9f0

View File

@@ -121,10 +121,15 @@ namespace Bloom
}
void InsightWorker::onTargetResetEvent(const Events::TargetReset& event) {
this->lastTargetState = TargetState::STOPPED;
emit this->targetStateUpdated(TargetState::RUNNING);
emit this->targetStateUpdated(TargetState::STOPPED);
emit this->targetProgramCounterUpdated(this->targetControllerConsole.getProgramCounter());
try {
this->lastTargetState = TargetState::STOPPED;
emit this->targetStateUpdated(TargetState::RUNNING);
emit this->targetStateUpdated(TargetState::STOPPED);
emit this->targetProgramCounterUpdated(this->targetControllerConsole.getProgramCounter());
} catch (const Exceptions::Exception& exception) {
Logger::debug("Error handling TargetReset event - " + exception.getMessage());
}
}
void InsightWorker::onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event) {