Files
wolfssl/doc/dox_comments/header_files/error-crypt.h

50 lines
1.1 KiB
C
Raw Normal View History

/*!
\ingroup Error
2018-06-27 16:22:12 -06:00
\brief This function stores the error string for a particular error code
in the given buffer.
2018-06-27 16:22:12 -06:00
\return none No returns.
2018-06-27 16:22:12 -06: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
at least WOLFSSL_MAX_ERROR_SZ (80 bytes) long
2018-06-27 16:22:12 -06: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
\sa wc_GetErrorString
*/
void wc_ErrorString(int err, char* buff);
/*!
\ingroup Error
2018-06-27 16:22:12 -06: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
string literal.
2018-06-27 16:22:12 -06:00
\param error error code for which to get the string
2018-06-27 16:22:12 -06: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
\sa wc_ErrorString
*/
const char* wc_GetErrorString(int error);