Restore the descriptions to conform with the rest of the
[openssl.git] / doc / crypto / ERR_get_error.pod
1 =pod
2
3 =head1 NAME
4
5 ERR_get_error, ERR_peek_error, ERR_get_error_line, ERR_peek_error_line,
6 ERR_get_error_line_data, ERR_peek_error_line_data - obtain error code and data
7
8 =head1 SYNOPSIS
9
10  #include <openssl/err.h>
11
12  unsigned long ERR_get_error(void);
13  unsigned long ERR_peek_error(void);
14
15  unsigned long ERR_get_error_line(const char **file, int *line);
16  unsigned long ERR_peek_error_line(const char **file, int *line);
17
18  unsigned long ERR_get_error_line_data(const char **file, int *line,
19          const char **data, int *flags);
20  unsigned long ERR_peek_error_line_data(const char **file, int *line,
21          const char **data, int *flags);
22
23 =head1 DESCRIPTION
24
25 ERR_get_error() returns the last error code from the thread's error
26 queue and removes the entry. This function can be called repeatedly
27 until there are no more error codes to return.
28
29 ERR_peek_error() returns the last error code from the thread's
30 error queue without modifying it.
31
32 See L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> for obtaining information about
33 location and reason of the error, and
34 L<ERR_error_string(3)|ERR_error_string(3)> for human-readable error
35 messages.
36
37 ERR_get_error_line() and ERR_peek_error_line() are the same as the
38 above, but they additionally store the file name and line number where
39 the error occurred in *B<file> and *B<line>, unless these are B<NULL>.
40
41 ERR_get_error_line_data() and ERR_peek_error_line_data() store
42 additional data and flags associated with the error code in *B<data>
43 and *B<flags>, unless these are B<NULL>. *B<data> contains a string
44 if *B<flags>&B<ERR_TXT_STRING>. If it has been allocated by Malloc(),
45 *B<flags>&B<ERR_TXT_MALLOCED> is true.
46
47 =head1 RETURN VALUES
48
49 The error code, or 0 if there is no error in the queue.
50
51 =head1 SEE ALSO
52
53 L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>,
54 L<ERR_GET_LIB(3)|ERR_GET_LIB(3)>
55
56 =head1 HISTORY
57
58 ERR_get_error(), ERR_peek_error(), ERR_get_error_line() and
59 ERR_peek_error_line() are available in all versions of SSLeay and
60 OpenSSL. ERR_get_error_line_data() and ERR_peek_error_line_data()
61 were added in SSLeay 0.9.0.
62
63 =cut