SoapySDR, being written in C++, uses C++ exceptions for most of its
error reporting. However, when using the C API, these exceptions are
automatically caught, and recorded in a global errno-like system [0].
This means that without explicit error checking, we never notice that
we, for instance, fail to set the samplerate due to clock mismanagement.
This PR adds some error management helper functions, and litters our
function wrapper code with @soapy_checked to automatically throw
Julia exceptions when something goes awry.
SoapySDR, being written in C++, uses C++ exceptions for most of its error reporting. However, when using the C API, these exceptions are automatically caught, and recorded in a global
errno
-like system [0]. This means that without explicit error checking, we never notice that we, for instance, fail to set the samplerate due to clock mismanagement. This PR adds some error management helper functions, and litters our function wrapper code with@soapy_checked
to automatically throw Julia exceptions when something goes awry.[0] https://github.com/pothosware/SoapySDR/blob/4e71a35e5dec5b63fa95be572e3ad39adb260e15/lib/ErrorHelpers.hpp#L16-L19