Skip to content

Commit

Permalink
Merge pull request #23 from doug1234/TellMeTheError
Browse files Browse the repository at this point in the history
Added a popup to handle errors thrown by OpenDDW.
  • Loading branch information
iguessthislldo authored Feb 12, 2024
2 parents b441282 + c2aef51 commit 7efba76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,18 @@ DDSMonitorMainWindow::DDSMonitorMainWindow() :
activateWindow();

// Join the DDS domain
CommonData::m_ddsManager = std::make_unique<DDSManager>();
m_participantPage = new ParticipantPage(mainTabWidget);
CommonData::m_ddsManager->joinDomain(domainID, "",
[page = m_participantPage](const ParticipantInfo& info) {page->addParticipant(info); },
[page = m_participantPage](const ParticipantInfo& info) {page->removeParticipant(info); });
m_publicationMonitor = std::make_unique<PublicationMonitor>();
m_subscriptionMonitor = std::make_unique<SubscriptionMonitor>();
try {
CommonData::m_ddsManager = std::make_unique<DDSManager>();
m_participantPage = new ParticipantPage(mainTabWidget);
CommonData::m_ddsManager->joinDomain(domainID, "", [page = m_participantPage](const ParticipantInfo& info) {page->addParticipant(info); },
[page = m_participantPage](const ParticipantInfo& info) {page->removeParticipant(info); });
m_publicationMonitor = std::make_unique<PublicationMonitor>();
m_subscriptionMonitor = std::make_unique<SubscriptionMonitor>();
}
catch (std::runtime_error &e) {
QMessageBox::information(nullptr, "Error Starting Open DDS", e.what());
exit(1);
}

// Send DDS configuration to the log screen
reportConfig();
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/OpenDDW

0 comments on commit 7efba76

Please sign in to comment.