shm: Improve error message when segment cannot be opened

This commit is contained in:
Alexey Rybalchenko
2021-03-17 12:34:24 +01:00
parent c8ad684b18
commit 62438bd99e
2 changed files with 6 additions and 1 deletions

View File

@@ -151,7 +151,8 @@ class Manager
<< " Allocation algorithm: " << allocationAlgorithm;
LOG(debug) << ss.str();
} catch(interprocess_exception& bie) {
LOG(error) << "something went wrong: " << bie.what();
LOG(error) << "Failed to create/open shared memory segment (" << "fmq_" << fShmId << "_m_" << fSegmentId << "): " << bie.what();
throw std::runtime_error(tools::ToString("Failed to create/open shared memory segment (", "fmq_", fShmId, "_m_", fSegmentId, "): ", bie.what()));
}
if (mlockSegment) {