10#ifndef IPCQ_ERROR_HPP_
11#define IPCQ_ERROR_HPP_
13#include <system_error>
72 const char* name()
const noexcept override {
79 std::string message(
int ev)
const noexcept override {
80 switch (
static_cast<Error>(ev)) {
82 return "non-blocking operation would block";
84 return "queue is closed";
86 return "operation timed out";
88 return "queue is in a inconsistent state";
90 return "type in shared memory does not match expected type";
92 return "value exeeds storage capacity";
94 return "file is not an ipcq shared object";
96 return "shared object file use a different protocol version";
const std::error_category & GetErrorCategory()
ipcq error category.
std::error_code make_error_code(Error e)
Function overload to create std::error_code from ipcq::Error.
Error
ipcq err condition enum.
@ Closed
Queue is closed or otherwise not available for reading.
@ Overflow
Value exeeds storage capacity.
@ InconsistentState
Reader is in an inconsistent state w.r.t.
@ TypeMismatch
Queue type mismatch.
@ BadVersion
File version mismatch (shared object created by ipcq with different file version).
@ Timeout
Operation timed out.
@ WouldBlock
Non-blocking operation would block.
@ BadFile
File type is incorrect (not an ipcq shared object).
std::error_condition make_error_condition(Error e)