Skip to content
Snippets Groups Projects
Commit cb37e426 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Handle Ice::NotRegisteredException

parent 9069f4d4
No related branches found
No related tags found
1 merge request!90Armem/memory
......@@ -24,7 +24,23 @@ namespace armarx::armem
armem::data::Commit commitIce;
armem::toIce(commitIce, commit);
armem::data::CommitResult resultIce = memory->commit(commitIce);
armem::data::CommitResult resultIce;
try
{
resultIce = memory->commit(commitIce);
}
catch (const Ice::NotRegisteredException& e)
{
armem::CommitResult result;
for (const auto& _ : commit.updates)
{
(void) _;
armem::EntityUpdateResult& r = result.results.emplace_back();
r.success = false;
r.errorMessage = "Memory component not registered.\n" + std::string(e.what());
}
return result;
}
armem::CommitResult result;
armem::fromIce(resultIce, result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment