Replace error messages with more readable strings

This commit is contained in:
Dominic Spill
2017-01-31 17:35:56 -07:00
parent 47fd25a707
commit 3c2a32981b

View File

@ -1609,40 +1609,40 @@ const char* ADDCALL hackrf_error_name(enum hackrf_error errcode)
return "HACKRF_TRUE"; return "HACKRF_TRUE";
case HACKRF_ERROR_INVALID_PARAM: case HACKRF_ERROR_INVALID_PARAM:
return "HACKRF_ERROR_INVALID_PARAM"; return "invalid parameter(s)";
case HACKRF_ERROR_NOT_FOUND: case HACKRF_ERROR_NOT_FOUND:
return "HACKRF_ERROR_NOT_FOUND"; return "HackRF not found";
case HACKRF_ERROR_BUSY: case HACKRF_ERROR_BUSY:
return "HACKRF_ERROR_BUSY"; return "HackRF busy";
case HACKRF_ERROR_NO_MEM: case HACKRF_ERROR_NO_MEM:
return "HACKRF_ERROR_NO_MEM"; return "insufficient memory";
case HACKRF_ERROR_LIBUSB: case HACKRF_ERROR_LIBUSB:
return "HACKRF_ERROR_LIBUSB"; return "USB error";
case HACKRF_ERROR_THREAD: case HACKRF_ERROR_THREAD:
return "HACKRF_ERROR_THREAD"; return "transfer thread error";
case HACKRF_ERROR_STREAMING_THREAD_ERR: case HACKRF_ERROR_STREAMING_THREAD_ERR:
return "HACKRF_ERROR_STREAMING_THREAD_ERR"; return "streaming thread encountered an error";
case HACKRF_ERROR_STREAMING_STOPPED: case HACKRF_ERROR_STREAMING_STOPPED:
return "HACKRF_ERROR_STREAMING_STOPPED"; return "streaming stopped";
case HACKRF_ERROR_STREAMING_EXIT_CALLED: case HACKRF_ERROR_STREAMING_EXIT_CALLED:
return "HACKRF_ERROR_STREAMING_EXIT_CALLED"; return "streaming terminated";
case HACKRF_ERROR_USB_API_VERSION: case HACKRF_ERROR_USB_API_VERSION:
return "feature not supported by installed firmware"; return "feature not supported by installed firmware";
case HACKRF_ERROR_OTHER: case HACKRF_ERROR_OTHER:
return "HACKRF_ERROR_OTHER"; return "unspecified error";
default: default:
return "HACKRF unknown error"; return "unknown error code";
} }
} }