error method
@brief Get a string describing the last error which occurred.
Whether a function sets the last error is noted in its documentation. These functions will reset the last error to NULL before their execution.
Strings returned from hid_error() must not be freed by the user!
This function is thread-safe, and error messages are thread-local.
@ingroup API @param dev A device handle returned from hid_open(), or NULL to get the last non-device-specific error (e.g. for errors in hid_open() itself).
@returns This function returns a string containing the last error which occurred or NULL if none has occurred.
Implementation
ffi.Pointer<wchar_t> error(
ffi.Pointer<hid_device> dev,
) {
return _error(
dev,
);
}