Open SCAP Library
Loading...
Searching...
No Matches
oscap_error.h
Go to the documentation of this file.
1/*
2 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
41#pragma once
42#ifndef OSCAP_ERROR_H
43#define OSCAP_ERROR_H
44
45#include <stdint.h>
46#include <stdbool.h>
47
48#include "oscap_export.h"
49
51typedef uint16_t oscap_errfamily_t;
52
57#define OSCAP_EFAMILY_NONE 0
58#define OSCAP_EFAMILY_GLIBC 1
59#define OSCAP_EFAMILY_XML 2
60#define OSCAP_EFAMILY_OSCAP 3
61#define OSCAP_EFAMILY_OVAL 4
62#define OSCAP_EFAMILY_XCCDF 5
63#define OSCAP_EFAMILY_SCE 6
64#define OSCAP_EFAMILY_NET 7
65#define OSCAP_EFAMILY_WINDOWS 8
71OSCAP_API void oscap_clearerr(void);
72
76OSCAP_API bool oscap_err(void);
77
82
86OSCAP_API const char *oscap_err_desc(void);
87
96OSCAP_API char *oscap_err_get_full_error(void);
97
100#endif /* OSCAP_ERROR_H */
OSCAP_API void oscap_clearerr(void)
Clear an error.
Definition error.c:137
OSCAP_API const char * oscap_err_desc(void)
Get last error description.
Definition error.c:173
OSCAP_API bool oscap_err(void)
Check for an error.
Definition error.c:150
OSCAP_API oscap_errfamily_t oscap_err_family(void)
Get last error family.
Definition error.c:159
uint16_t oscap_errfamily_t
Error family type.
Definition oscap_error.h:51
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