Skip to content
Start free evaluation

pdcomm::opcua::error

Class

Exception thrown by the wrapper for every failed C ABI call.

class error : public std::runtime_error

Declared in: #include <pdcomm/opcua/pdcomm_opcua.hpp>

what() is the English detail text of the failure, taken from pdcomm_opcua_last_error_copy() on the failing thread. Use status() for decisions, never the text.

Members

error

Constructor

Creates an exception.

error(int32_t status, const std::string& text)

Declared in: #include <pdcomm/opcua/pdcomm_opcua.hpp>

Parameters

NameDescription
status::pdcomm_opcua_status value of the failed call.
textEnglish detail text.

license_required

Method

Tells whether the call was refused for lack of a PDComm license.

bool license_required() const noexcept

Declared in: #include <pdcomm/opcua/pdcomm_opcua.hpp>

Returns

true for #PDCOMM_OPCUA_LICENSE_REQUIRED; what() then names the module and the license state.

status

Method

Returns the status of the failed call.

int32_t status() const noexcept

Declared in: #include <pdcomm/opcua/pdcomm_opcua.hpp>

Returns

A ::pdcomm_opcua_status value other than #PDCOMM_OPCUA_OK.