Make better error message

This commit is contained in:
2021-07-19 13:11:43 +02:00
parent 5987eb67a9
commit 8a88a1b1da
+1 -1
View File
@@ -40,7 +40,7 @@ RamBuffer::RamBuffer(const string& buffer_name,
shm_fd_ = shm_open(buffer_name_.c_str(), O_RDWR | O_CREAT, 0777);
if (shm_fd_ < 0) {
throw runtime_error(strerror(errno));
throw runtime_error(string("shm_open failed: ") + strerror(errno));
}
if ((ftruncate(shm_fd_, buffer_bytes_)) == -1) {