SurgSim::Devices::Internal Namespace Reference

## Functions

int64_t | getSystemErrorCode ()
| Gets the most recent error code from the operating system. More...
std::string | getSystemErrorText (int64_t errorCode=getSystemErrorCode())
| Gets the system error text corresponding to the specified error code, or the most recent error text. More...

## Function Documentation

## getSystemErrorCode()

int64_t SurgSim::Devices::Internal::getSystemErrorCode | ( |  | ) |

Gets the most recent error code from the operating system.

The error code will correspond to the status of the most recent failed (or, in some cases, successful) call to the operating system APIs from this thread.

Returns
  The OS-dependent system error code.

## getSystemErrorText()

std::string SurgSim::Devices::Internal::getSystemErrorText | ( | int64_t | errorCode = `getSystemErrorCode()` | ) |

Gets the system error text corresponding to the specified error code, or the most recent error text.

Parameters

  errorCode | (Optional) The error code. If omitted, the most recent OS error code will be used.

Returns
  The error text corresponding to the error code.