Flow-IPC 1.0.1
Flow-IPC project: Full implementation reference.
Classes | Enumerations | Functions | Variables
ipc::session::error Namespace Reference

Namespace containing the ipc::session module's extension of boost.system error conventions, so that that API can return codes/messages from within its own new set of error codes/messages. More...

Classes

class  Category
 The boost.system category for errors returned by the ipc::session module. More...
 

Enumerations

enum class  Code {
  S_INVALID_ARGUMENT = S_CODE_LOWEST_INT_VALUE , S_OBJECT_SHUTDOWN_ABORTED_COMPLETION_HANDLER , S_CLIENT_NAMESPACE_STORE_BAD_FORMAT , S_CLIENT_MASTER_LOG_IN_RESPONSE_BAD ,
  S_SERVER_MASTER_LOG_IN_REQUEST_CLIENT_APP_DISALLOWED_OR_UNKNOWN , S_SERVER_MASTER_LOG_IN_REQUEST_CLIENT_APP_INCONSISTENT_CREDS , S_SESSION_OPEN_CHANNEL_REMOTE_PEER_REJECTED_PASSIVE_OPEN , S_SESSION_OPEN_CHANNEL_SERVER_CANNOT_PROCEED_RESOURCE_UNAVAILABLE ,
  S_SESSION_OPEN_CHANNEL_ACTIVE_TIMEOUT , S_MUTEX_BIPC_MISC_LIBRARY_ERROR , S_SERVER_MASTER_POST_LOG_IN_SEND_FAILED_MISC , S_SERVER_MASTER_LOG_IN_REQUEST_CONFIG_MISMATCH ,
  S_RESOURCE_OWNER_UNEXPECTED , S_SESSION_FINISHED , S_END_SENTINEL
}
 All possible errors returned (via Error_code arguments) by ipc::session functions/methods outside of ipc::transport-triggered errors involved in transport involved in doing session-related work; and possibly system-triggered errors. More...
 

Functions

Error_code make_error_code (Code err_code)
 Analogous to transport::error::make_error_code(). More...
 
std::ostream & operator<< (std::ostream &os, Code val)
 Analogous to transport::error::operator<<(). More...
 
std::istream & operator>> (std::istream &is, Code &val)
 Analogous to transport::error::operator>>(). More...
 

Variables

constexpr int S_CODE_LOWEST_INT_VALUE = 1
 Numeric value of the lowest Code. More...
 

Detailed Description

Namespace containing the ipc::session module's extension of boost.system error conventions, so that that API can return codes/messages from within its own new set of error codes/messages.

Historically this was written after ipc::transport::error, and essentially all the notes in that doc header and otherwise within that namespace apply equally here. Therefore please:

See also
ipc::transport::error documentation; notes therein (such as to-dos) likely apply here equally.

Enumeration Type Documentation

◆ Code

enum class ipc::session::error::Code
strong

All possible errors returned (via Error_code arguments) by ipc::session functions/methods outside of ipc::transport-triggered errors involved in transport involved in doing session-related work; and possibly system-triggered errors.

All notes from transport::error::Code doc header apply here.

Enumerator
S_INVALID_ARGUMENT 

User called an API with 1 or more arguments against the API spec.

S_OBJECT_SHUTDOWN_ABORTED_COMPLETION_HANDLER 

Async completion handler is being called prematurely, because underlying object is shutting down, as user desires.

S_CLIENT_NAMESPACE_STORE_BAD_FORMAT 

Session master channel: log-in as client: The Client Namespace Store (CNS) file (a/k/a PID file) lacks leading newline-terminated line with numeric PID.

S_CLIENT_MASTER_LOG_IN_RESPONSE_BAD 

Session master channel: log-in as client: received log-in response is not the expected internal message.

S_SERVER_MASTER_LOG_IN_REQUEST_CLIENT_APP_DISALLOWED_OR_UNKNOWN 

Session master channel: log-in as server: client identifies self as unknown client-app or one that is not registered as an allowed partner to this server-app.

S_SERVER_MASTER_LOG_IN_REQUEST_CLIENT_APP_INCONSISTENT_CREDS 

Session master channel: log-in as server: client application-level process credentials (UID, etc.) do not match the registered values and/or the OS-reported client peer values from socket stream.

S_SESSION_OPEN_CHANNEL_REMOTE_PEER_REJECTED_PASSIVE_OPEN 

Session channel opening: User code chose to reject all passive-open requests.

S_SESSION_OPEN_CHANNEL_SERVER_CANNOT_PROCEED_RESOURCE_UNAVAILABLE 

Session channel opening: Server peer is responsible for low-level resource acquisition but failed to do so.

S_SESSION_OPEN_CHANNEL_ACTIVE_TIMEOUT 

Session channel opening: Other peer must reply quickly enough as-if non-blocking but did not do so in time.

Session continues; this is not a fatal error.

S_MUTEX_BIPC_MISC_LIBRARY_ERROR 

Low-level boost.ipc.mutex: boost.interprocess emitted miscellaneous library exception sans a system code; a WARNING message at throw-time should contain all possible details.

S_SERVER_MASTER_POST_LOG_IN_SEND_FAILED_MISC 

Session master channel: post-log-in setup (such as SHM setup): send failed because channel hosed around that time.

Timing was such that exact reason for this could not be obtained, but logs will show it.

S_SERVER_MASTER_LOG_IN_REQUEST_CONFIG_MISMATCH 

Session master channel: log-in as server: opposing client's compile-time type config differs from local server's counterpart config; did you use the proper Server/Client_session paired templates and mutually equal template parameters?

S_RESOURCE_OWNER_UNEXPECTED 

A resource in the file system (file, SHM pool, MQ, etc.) has or could have unexpected owner; ipc::session may emit this when acquiring resources and/or opening session if the server process is not running as the configured user, or a previous iteration was not running as that user.

S_SESSION_FINISHED 

The opposing end of the session in question has been closed gracefully by the user invoking the end-session API.

S_END_SENTINEL 

SENTINEL: Not an error. This Code must never be issued by an error/success-emitting API; I/O use only.

Definition at line 46 of file error.hpp.

Function Documentation

◆ make_error_code()

Error_code ipc::session::error::make_error_code ( Code  err_code)

Analogous to transport::error::make_error_code().

Parameters
err_codeSee above.
Returns
See above.

Definition at line 79 of file error.cpp.

References ipc::session::error::Category::S_CATEGORY.

◆ operator<<()

std::ostream & ipc::session::error::operator<< ( std::ostream &  os,
Code  val 
)

Analogous to transport::error::operator<<().

Parameters
osSee above.
valSee above.
Returns
See above.

Definition at line 195 of file error.cpp.

References ipc::session::error::Category::code_symbol().

Here is the call graph for this function:

◆ operator>>()

std::istream & ipc::session::error::operator>> ( std::istream &  is,
Code val 
)

Analogous to transport::error::operator>>().

Parameters
isSee above.
valSee above.
Returns
See above.

Definition at line 201 of file error.cpp.

References S_CODE_LOWEST_INT_VALUE, and S_END_SENTINEL.

Variable Documentation

◆ S_CODE_LOWEST_INT_VALUE

constexpr int ipc::session::error::S_CODE_LOWEST_INT_VALUE = 1
constexpr

Numeric value of the lowest Code.

Definition at line 37 of file error.hpp.

Referenced by operator>>().