Loading...
Searching...
No Matches
oscap_error.h
Go to the documentation of this file.
/*
* Copyright 2009 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
#ifndef OSCAP_ERROR_H
#define OSCAP_ERROR_H
#include <stdint.h>
#include <stdbool.h>
#include "oscap_export.h"
typedef uint16_t oscap_errfamily_t;
#define OSCAP_EFAMILY_NONE 0
#define OSCAP_EFAMILY_GLIBC 1
#define OSCAP_EFAMILY_XML 2
#define OSCAP_EFAMILY_OSCAP 3
#define OSCAP_EFAMILY_OVAL 4
#define OSCAP_EFAMILY_XCCDF 5
#define OSCAP_EFAMILY_SCE 6
#define OSCAP_EFAMILY_NET 7
#define OSCAP_EFAMILY_WINDOWS 8
OSCAP_API void oscap_clearerr(void);
OSCAP_API bool oscap_err(void);
OSCAP_API oscap_errfamily_t oscap_err_family(void);
OSCAP_API const char *oscap_err_desc(void);
OSCAP_API char *oscap_err_get_full_error(void);
#endif /* OSCAP_ERROR_H */
oscap_clearerr
OSCAP_API void oscap_clearerr(void)
Clear an error.
Definition error.c:137
oscap_err_desc
OSCAP_API const char * oscap_err_desc(void)
Get last error description.
Definition error.c:173
oscap_err
OSCAP_API bool oscap_err(void)
Check for an error.
Definition error.c:150
oscap_err_family
OSCAP_API oscap_errfamily_t oscap_err_family(void)
Get last error family.
Definition error.c:159
oscap_errfamily_t
uint16_t oscap_errfamily_t
Error family type.
Definition oscap_error.h:51
oscap_err_get_full_error
OSCAP_API char * oscap_err_get_full_error(void)
Get the full description for all the errors which has occurred in this thread since the last call of ...
Definition error.c:187