#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);
_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.