Skip to content
Start free evaluation

pdcomm::Error

Class

Exception thrown when a native PDComm call returns a status other than PDCOMM_OK.

class Error : public std::runtime_error

Declared in: #include <pdcomm.hpp>

what() 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)

Declared in: #include <pdcomm.hpp>

Parameters

NameDescription
statusNative status returned by the failed call.

status

Method

Returns the native status that caused this exception.

PdcommStatus status() const noexcept

Declared in: #include <pdcomm.hpp>

Returns

The PDCOMM_* status code, never PDCOMM_OK when thrown by a wrapper.