ERR_get_error 3 2003-07-24 0.9.9-dev OpenSSL

NAME

ERR_get_error, ERR_peek_error, ERR_peek_last_error, ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line, ERR_get_error_line_data, ERR_peek_error_line_data, ERR_peek_last_error_line_data - obtain error code and data

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 




 unsigned long ERR_get_error(void);
 unsigned long ERR_peek_error(void);
 unsigned long ERR_peek_last_error(void);


 unsigned long ERR_get_error_line(const char **file, int *line);
 unsigned long ERR_peek_error_line(const char **file, int *line);
 unsigned long ERR_peek_last_error_line(const char **file, int *line);






 unsigned long ERR_get_error_line_data(const char **file, int *line,
         const char **data, int *flags);
 unsigned long ERR_peek_error_line_data(const char **file, int *line,
         const char **data, int *flags);
 unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
         const char **data, int *flags);

DESCRIPTION

_E_R_R___g_e_t___e_r_r_o_r_(_) returns the earliest error code from the thread's error queue and removes the entry. This function can be called repeatedly until there are no more error codes to return.

_E_R_R___p_e_e_k___e_r_r_o_r_(_) returns the earliest error code from the thread's error queue without modifying it.

_E_R_R___p_e_e_k___l_a_s_t___e_r_r_o_r_(_) returns the latest error code from the thread's error queue without modifying it.

See _E_R_R___G_E_T___L_I_B(3) for obtaining information about location and reason of the error, and _E_R_R___e_r_r_o_r___s_t_r_i_n_g(3) for human-readable error messages.

_E_R_R___g_e_t___e_r_r_o_r___l_i_n_e_(_), _E_R_R___p_e_e_k___e_r_r_o_r___l_i_n_e_(_) and _E_R_R___p_e_e_k___l_a_s_t___e_r_r_o_r___l_i_n_e_(_) are the same as the above, but they additionally store the file name and line number where the error occurred in *ffiillee and *lliinnee, unless these are NNUULLLL.

_E_R_R___g_e_t___e_r_r_o_r___l_i_n_e___d_a_t_a_(_), _E_R_R___p_e_e_k___e_r_r_o_r___l_i_n_e___d_a_t_a_(_) and _E_R_R___g_e_t___l_a_s_t___e_r_r_o_r___l_i_n_e___d_a_t_a_(_) store additional data and flags associated with the error code in *ddaattaa and *ffllaaggss, unless these are NNUULLLL. *ddaattaa contains a string if *ffllaaggss&EERRRR__TTXXTT__SSTTRRIINNGG. If it has been allocated by _O_P_E_N_S_S_L___m_a_l_l_o_c_(_), *ffllaaggss&EERRRR__TTXXTT__MMAALLLLOOCCEEDD is true.

RETURN VALUES

The error code, or 0 if there is no error in the queue.

SEE ALSO

_o_p_e_n_s_s_l___e_r_r(3), _E_R_R___e_r_r_o_r___s_t_r_i_n_g(3), _E_R_R___G_E_T___L_I_B(3)

HISTORY

_E_R_R___g_e_t___e_r_r_o_r_(_), _E_R_R___p_e_e_k___e_r_r_o_r_(_), _E_R_R___g_e_t___e_r_r_o_r___l_i_n_e_(_) and _E_R_R___p_e_e_k___e_r_r_o_r___l_i_n_e_(_) are available in all versions of SSLeay and OpenSSL. _E_R_R___g_e_t___e_r_r_o_r___l_i_n_e___d_a_t_a_(_) and _E_R_R___p_e_e_k___e_r_r_o_r___l_i_n_e___d_a_t_a_(_) were added in SSLeay 0.9.0. _E_R_R___p_e_e_k___l_a_s_t___e_r_r_o_r_(_), _E_R_R___p_e_e_k___l_a_s_t___e_r_r_o_r___l_i_n_e_(_) and _E_R_R___p_e_e_k___l_a_s_t___e_r_r_o_r___l_i_n_e___d_a_t_a_(_) were added in OpenSSL 0.9.7.