NxLibException

This class encapsulates NxLib API errors. All overloaded functions of NxLibItem and NxLibCommand not taking a return code pointer will throw an NxLibException when the API return code indicates an error.

class NxLibException

Public Functions

NxLibException(std::string const &_itemPath, int _errorCode, std::shared_ptr<NxLibItemToken> _token = nullptr)

Constructor

Parameters
  • _itemPath: The item path of the NxLibItem.

  • _errorCode:

  • _token:

int getErrorCode() const

The NxLib API return code that caused this exception.

std::string const &getErrorText() const

The text description of the failure.

std::string const &getItemPath() const

The path to the item on which the failed operation was attempted.

std::shared_ptr<NxLibItemToken> const &getToken() const

Token that holds a NxLibItem.