USRP Hardware Driver and USRP Manual: error.h File Reference

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
error.h File Reference
`#include <stdlib.h>`

Go to the source code of this file.

## Enumerations
enum | uhd_error { UHD_ERROR_NONE = 0 , UHD_ERROR_INVALID_DEVICE = 1 , UHD_ERROR_INDEX = 10 , UHD_ERROR_KEY = 11 , UHD_ERROR_NOT_IMPLEMENTED = 20 , UHD_ERROR_USB = 21 , UHD_ERROR_IO = 30 , UHD_ERROR_OS = 31 , UHD_ERROR_ASSERTION = 40 , UHD_ERROR_LOOKUP = 41 , UHD_ERROR_TYPE = 42 , UHD_ERROR_VALUE = 43 , UHD_ERROR_RUNTIME = 44 , UHD_ERROR_ENVIRONMENT = 45 , UHD_ERROR_SYSTEM = 46 , UHD_ERROR_EXCEPT = 47 , UHD_ERROR_BOOSTEXCEPT = 60 , UHD_ERROR_STDEXCEPT = 70 , UHD_ERROR_UNKNOWN = 100 }
| UHD error codes. More...

## Functions
UHD_API uhd_error | uhd_get_last_error (char *error_out, size_t strbuffer_len)
| Return the last error string reported by UHD.

## Enumeration Type Documentation

## ◆ uhd_error

enum uhd_error

UHD error codes.

Each error code corresponds to a specific uhd::exception, with extra codes corresponding to a boost::exception, std::exception, and a catch-all for everything else. When an internal C++ function throws an exception, UHD converts it to one of these error codes to return on the C level.

Enumerator
UHD_ERROR_NONE | No error thrown.
UHD_ERROR_INVALID_DEVICE | Invalid device arguments.
UHD_ERROR_INDEX | See uhd::index_error.
UHD_ERROR_KEY | See uhd::key_error.
UHD_ERROR_NOT_IMPLEMENTED | See uhd::not_implemented_error.
UHD_ERROR_USB | See uhd::usb_error.
UHD_ERROR_IO | See uhd::io_error.
UHD_ERROR_OS | See uhd::os_error.
UHD_ERROR_ASSERTION | See uhd::assertion_error.
UHD_ERROR_LOOKUP | See uhd::lookup_error.
UHD_ERROR_TYPE | See uhd::type_error.
UHD_ERROR_VALUE | See uhd::value_error.
UHD_ERROR_RUNTIME | See uhd::runtime_error.
UHD_ERROR_ENVIRONMENT | See uhd::environment_error.
UHD_ERROR_SYSTEM | See uhd::system_error.
UHD_ERROR_EXCEPT | See uhd::exception.
UHD_ERROR_BOOSTEXCEPT | A boost::exception was thrown.
UHD_ERROR_STDEXCEPT | A std::exception was thrown.
UHD_ERROR_UNKNOWN | An unknown error was thrown.

## Function Documentation

## ◆ uhd_get_last_error()

UHD_API uhd_error uhd_get_last_error | ( | char * | error_out,
|  | size_t | strbuffer_len )

Return the last error string reported by UHD.

Functions that do not take in UHD structs/handles will place any error strings into a buffer that can be queried with this function. Functions that do take in UHD structs/handles will place their error strings in both locations.