Blame doc/man3/ERR_GET_LIB.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON, ERR_FATAL_ERROR
Packit c4476c
- get information from error codes
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/err.h>
Packit c4476c
Packit c4476c
 int ERR_GET_LIB(unsigned long e);
Packit c4476c
Packit c4476c
 int ERR_GET_FUNC(unsigned long e);
Packit c4476c
Packit c4476c
 int ERR_GET_REASON(unsigned long e);
Packit c4476c
Packit c4476c
 int ERR_FATAL_ERROR(unsigned long e);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
The error code returned by ERR_get_error() consists of a library
Packit c4476c
number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC()
Packit c4476c
and ERR_GET_REASON() can be used to extract these.
Packit c4476c
Packit c4476c
ERR_FATAL_ERROR() indicates whether a given error code is a fatal error.
Packit c4476c
Packit c4476c
The library number and function code describe where the error
Packit c4476c
occurred, the reason code is the information about what went wrong.
Packit c4476c
Packit c4476c
Each sub-library of OpenSSL has a unique library number; function and
Packit c4476c
reason codes are unique within each sub-library.  Note that different
Packit c4476c
libraries may use the same value to signal different functions and
Packit c4476c
reasons.
Packit c4476c
Packit c4476c
B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally
Packit c4476c
unique. However, when checking for sub-library specific reason codes,
Packit c4476c
be sure to also compare the library number.
Packit c4476c
Packit c4476c
ERR_GET_LIB(), ERR_GET_FUNC(), ERR_GET_REASON(), and ERR_FATAL_ERROR()
Packit c4476c
 are macros.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
The library number, function code, reason code, and whether the error
Packit c4476c
is fatal, respectively.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ERR_get_error(3)>
Packit c4476c
Packit c4476c
=head1 HISTORY
Packit c4476c
Packit c4476c
ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in
Packit c4476c
all versions of OpenSSL.
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut