1ERR_GET_ERROR(3)                    OpenSSL                   ERR_GET_ERROR(3)
2
3
4

NAME

6       ERR_get_error, ERR_peek_error, ERR_peek_last_error, ERR_get_error_line,
7       ERR_peek_error_line, ERR_peek_last_error_line, ERR_get_error_line_data,
8       ERR_peek_error_line_data, ERR_peek_last_error_line_data - obtain error
9       code and data
10

SYNOPSIS

12        #include <openssl/err.h>
13
14        unsigned long ERR_get_error(void);
15        unsigned long ERR_peek_error(void);
16        unsigned long ERR_peek_last_error(void);
17
18        unsigned long ERR_get_error_line(const char **file, int *line);
19        unsigned long ERR_peek_error_line(const char **file, int *line);
20        unsigned long ERR_peek_last_error_line(const char **file, int *line);
21
22        unsigned long ERR_get_error_line_data(const char **file, int *line,
23                                              const char **data, int *flags);
24        unsigned long ERR_peek_error_line_data(const char **file, int *line,
25                                               const char **data, int *flags);
26        unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
27                                                    const char **data, int *flags);
28

DESCRIPTION

30       ERR_get_error() returns the earliest error code from the thread's error
31       queue and removes the entry. This function can be called repeatedly
32       until there are no more error codes to return.
33
34       ERR_peek_error() returns the earliest error code from the thread's
35       error queue without modifying it.
36
37       ERR_peek_last_error() returns the latest error code from the thread's
38       error queue without modifying it.
39
40       See ERR_GET_LIB(3) for obtaining information about location and reason
41       of the error, and ERR_error_string(3) for human-readable error
42       messages.
43
44       ERR_get_error_line(), ERR_peek_error_line() and
45       ERR_peek_last_error_line() are the same as the above, but they
46       additionally store the filename and line number where the error
47       occurred in *file and *line, unless these are NULL.
48
49       ERR_get_error_line_data(), ERR_peek_error_line_data() and
50       ERR_peek_last_error_line_data() store additional data and flags
51       associated with the error code in *data and *flags, unless these are
52       NULL. *data contains a string if *flags&ERR_TXT_STRING is true.
53
54       An application MUST NOT free the *data pointer (or any other pointers
55       returned by these functions) with OPENSSL_free() as freeing is handled
56       automatically by the error library.
57

RETURN VALUES

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

SEE ALSO

62       ERR_error_string(3), ERR_GET_LIB(3)
63
65       Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
66
67       Licensed under the OpenSSL license (the "License").  You may not use
68       this file except in compliance with the License.  You can obtain a copy
69       in the file LICENSE in the source distribution or at
70       <https://www.openssl.org/source/license.html>.
71
72
73
741.1.1q                            2023-02-06                  ERR_GET_ERROR(3)
Impressum