2017-12-29 10:45:37 -07:00
|
|
|
/*!
|
|
|
|
\ingroup Error
|
2018-06-27 16:22:12 -06:00
|
|
|
|
|
|
|
\brief This function stores the error string for a particular error code
|
2017-12-29 10:45:37 -07:00
|
|
|
in the given buffer.
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\return none No returns.
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\param error error code for which to get the string
|
2018-06-27 16:22:12 -06:00
|
|
|
\param buffer buffer in which to store the error string. Buffer should be
|
2017-12-29 10:45:37 -07:00
|
|
|
at least WOLFSSL_MAX_ERROR_SZ (80 bytes) long
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
_Example_
|
|
|
|
\code
|
|
|
|
char errorMsg[WOLFSSL_MAX_ERROR_SZ];
|
|
|
|
int err = wc_some_function();
|
|
|
|
|
|
|
|
if( err != 0) { // error occurred
|
|
|
|
wc_ErrorString(err, errorMsg);
|
|
|
|
}
|
|
|
|
\endcode
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\sa wc_GetErrorString
|
|
|
|
*/
|
2022-04-06 16:17:36 +01:00
|
|
|
void wc_ErrorString(int err, char* buff);
|
2018-05-02 13:28:17 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
/*!
|
|
|
|
\ingroup Error
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\brief This function returns the error string for a particular error code.
|
2018-06-27 16:22:12 -06:00
|
|
|
|
|
|
|
\return string Returns the error string for an error code as a
|
2017-12-29 10:45:37 -07:00
|
|
|
string literal.
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\param error error code for which to get the string
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
_Example_
|
|
|
|
\code
|
|
|
|
char * errorMsg;
|
|
|
|
int err = wc_some_function();
|
|
|
|
|
|
|
|
if( err != 0) { // error occurred
|
|
|
|
errorMsg = wc_GetErrorString(err);
|
|
|
|
}
|
|
|
|
\endcode
|
2018-06-27 16:22:12 -06:00
|
|
|
|
2017-12-29 10:45:37 -07:00
|
|
|
\sa wc_ErrorString
|
|
|
|
*/
|
2022-04-06 16:17:36 +01:00
|
|
|
const char* wc_GetErrorString(int error);
|