CVB++ 14.0
OpcUaException Class Reference

Special runtime exception to carry a native error code. More...

#include <cvb/opcua/exception.hpp>

Inherits runtime_error.

Public Member Functions

 OpcUaException (int errorCode) noexcept
 Creates a runtime exception to carry a native error code. More...
 
 OpcUaException (int errorCode, const std::string &msg) noexcept
 Creates a runtime exception to carry a user choosen error code and message. More...
 
int ErrorCode ()
 Retuns the error code. See Cvb::ErrorCodes. More...
 

Detailed Description

Special runtime exception to carry a native error code.

Examples
OpcUa/BareboneClient, OpcUa/BareboneServer, and OpcUa/ServerClientInteraction.

Constructor & Destructor Documentation

◆ OpcUaException() [1/2]

OpcUaException ( int  errorCode)
inlineexplicitnoexcept

Creates a runtime exception to carry a native error code.

Parameters
[in]errorCodeThe errorCode returned by the C-API.

◆ OpcUaException() [2/2]

OpcUaException ( int  errorCode,
const std::string msg 
)
inlineexplicitnoexcept

Creates a runtime exception to carry a user choosen error code and message.

Parameters
[in]errorCodeThe errorCode returned by the C-API.
[in]msgThe errorCode returned by the C-API.

Member Function Documentation

◆ ErrorCode()

int ErrorCode ( )
inline

Retuns the error code. See Cvb::ErrorCodes.

Returns
The errorCode returned by the C-API (i.e. which is stored in the exception).
Examples
OpcUa/BareboneClient, and OpcUa/ServerClientInteraction.