Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed May 28, 2024
1 parent 80b1236 commit a4b1869
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
timeout-minutes: 30
with:
working_directory: ice/cpp
msbuild_project: C++11 demos.sln
msbuild_project: C++ demos.sln
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions cpp/Chat/client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ createSession(Glacier2::RouterPrx router)
optional<Chat::ChatSessionPrx> session{router->createSession(id, pw)};
if (!session)
{
cerr << "Glaicer2::createSession return null. Is the SessionManager configured?" << endl;
exit(1);
throw runtime_error("Glaicer2::createSession return null. Is the SessionManager configured?");
}
router->ice_getCachedConnection()->setCloseCallback(
[](Ice::ConnectionPtr)
Expand Down Expand Up @@ -116,8 +115,7 @@ run(shared_ptr<Ice::Communicator> communicator)
optional<Glacier2::RouterPrx> router{communicator->getDefaultRouter()};
if (!router)
{
cerr << "No router configured" << endl;
exit(1);
throw runtime_error("Glaicer2::createSession return null. Is the SessionManager configured?");
}

// Create a session with the Glacier2 router
Expand Down
5 changes: 2 additions & 3 deletions cpp/Glacier2/callback/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ run(const shared_ptr<Ice::Communicator>& communicator)
optional<Ice::RouterPrx> defaultRouter = communicator->getDefaultRouter();
if (!defaultRouter)
{
cerr << "no router configured" << endl;
exit(1);
throw runtime_error("Glaicer2::createSession return null. Is the SessionManager configured?");
}
const Glacier2::RouterPrx router = Glacier2::RouterPrx(*communicator->getDefaultRouter());
const Glacier2::RouterPrx router = Glacier2::RouterPrx(*defaultRouter);

optional<Glacier2::SessionPrx> session;
//
Expand Down
5 changes: 2 additions & 3 deletions cpp/Glacier2/simpleChat/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ run(const shared_ptr<Ice::Communicator>& communicator)
optional<Ice::RouterPrx> defaultRouter = communicator->getDefaultRouter();
if (!defaultRouter)
{
cerr << "no router configured" << endl;
exit(1);
throw runtime_error("Glaicer2::createSession return null. Is the SessionManager configured?");
}
const Glacier2::RouterPrx router = Glacier2::RouterPrx(*communicator->getDefaultRouter());
const Glacier2::RouterPrx router = Glacier2::RouterPrx(*defaultRouter);
optional<ChatSessionPrx> session;
while (!session)
{
Expand Down

0 comments on commit a4b1869

Please sign in to comment.