pdcomm::Error
Class
Exception thrown when a native PDComm call returns a status other than PDCOMM_OK.
class Error : public std::runtime_errorwhat() returns a fixed generic message, except for PDCOMM_LICENSE_REQUIRED, whose message says that a PDComm license is required. Use status() to find the cause: compare it with the PDCOMM_* status macros from pdcomm.h, pdcomm_tcp.h and the GEM headers, for example PDCOMM_INVALID_ARGUMENT, PDCOMM_LIMIT_EXCEEDED, PDCOMM_INVALID_STATE or PDCOMM_STALE_TOKEN. PDCOMM_LICENSE_REQUIRED means that no license grants the module; pdcomm::License::status() (pdcomm_license.hpp) reports why.
Members
Error
Constructor
Creates an exception for a failed native call.
explicit Error(PdcommStatus status)Parameters
| Name | Description |
|---|---|
status | Native status returned by the failed call. |
status
Method
Returns the native status that caused this exception.
PdcommStatus status() const noexceptReturns
The PDCOMM_* status code, never PDCOMM_OK when thrown by a wrapper.