1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
/*
* This file is part of libmodulemd
* Copyright (C) 2019 Red Hat, Inc.
*
* Fedora-License-Identifier: MIT
* SPDX-2.0-License-Identifier: MIT
* SPDX-3.0-License-Identifier: MIT
*
* This program is free software.
* For more information on the license, see COPYING.
* For more information on free software, see <https://www.gnu.org/philosophy/free-sw.en.html>.
*/
#pragma once
#include <glib.h>
#include "modulemd-deprecated.h"
G_BEGIN_DECLS
/**
* SECTION: modulemd-errors
* @title: Modulemd Errors
* @stability: stable
* @short_description: Error codes for libmodulemd.
*/
/**
* MODULEMD_ERROR:
*
* A convenience macro for identifying an error in the general modulemd domain.
*
* Since: 2.9
*/
#define MODULEMD_ERROR modulemd_error_quark ()
/**
* modulemd_error_quark:
*
* Returns: A #GQuark used to identify an error in the general modulemd domain.
*
* Since: 2.9
*/
GQuark
modulemd_error_quark (void);
/**
* ModulemdError:
* @MMD_ERROR_UPGRADE: Represents an error encountered while upgrading the
* metadata version of a module stream or module defaults.
* @MMD_ERROR_VALIDATE: Represents an error encountered while validating
* module metadata.
* @MMD_ERROR_FILE_ACCESS: Represents an error encountered when attempting
* to access a file.
* @MMD_ERROR_NO_MATCHES: Represents an error indicating that no streams
* matched when searching for a specific module stream.
* @MMD_ERROR_TOO_MANY_MATCHES: Represents an error indicating that
* multiple streams matched when searching for a specific module
* stream.
* @MMD_ERROR_MAGIC: Could not detect the mime type of a file for
* automatic detection of compression format.
* @MMD_ERROR_NOT_IMPLEMENTED: The requested function is not implemented
* on this platform, likely due to needing a newer version of a dependency
* library.
* @MMD_ERROR_MISSING_REQUIRED: The object is missing some data necessary
* for proper operation.
*
* Since: 2.9
*/
typedef enum
{
MMD_ERROR_UPGRADE,
MMD_ERROR_VALIDATE,
MMD_ERROR_FILE_ACCESS,
MMD_ERROR_NO_MATCHES,
MMD_ERROR_TOO_MANY_MATCHES,
MMD_ERROR_MAGIC,
MMD_ERROR_NOT_IMPLEMENTED,
MMD_ERROR_MISSING_REQUIRED
} ModulemdError;
/**
* ModulemdErrorEnum:
* @MODULEMD_ERROR_UPGRADE: Represents an error encountered while upgrading the
* metadata version of a module stream or module defaults.
* @MODULEMD_ERROR_VALIDATE: Represents an error encountered while validating
* module metadata.
* @MODULEMD_ERROR_FILE_ACCESS: Represents an error encountered when attempting
* to access a file.
* @MODULEMD_ERROR_NO_MATCHES: Represents an error indicating that no streams
* matched when searching for a specific module stream. Since: 2.2
* @MODULEMD_ERROR_TOO_MANY_MATCHES: Represents an error indicating that
* multiple streams matched when searching for a specific module
* stream. Since: 2.2
* @MODULEMD_ERROR_MAGIC: Could not detect the mime type of a file for
* automatic detection of compression format. Since: 2.8
* @MODULEMD_ERROR_NOT_IMPLEMENTED: The requested function is not implemented
* on this platform, likely due to needing a newer version of a dependency
* library. Since: 2.8
*
* Since: 2.0
* Deprecated: 2.9
* Use #ModulemdError instead.
*/
MMD_DEPRECATED_TYPE_FOR (ModulemdError)
typedef enum
{
MODULEMD_ERROR_UPGRADE,
MODULEMD_ERROR_VALIDATE,
MODULEMD_ERROR_FILE_ACCESS,
MODULEMD_ERROR_NO_MATCHES,
MODULEMD_ERROR_TOO_MANY_MATCHES,
MODULEMD_ERROR_MAGIC,
MODULEMD_ERROR_NOT_IMPLEMENTED
} ModulemdErrorEnum;
/**
* MODULEMD_YAML_ERROR:
*
* A convenience macro for identifying an error in the modulemd yaml domain.
*
* Since: 2.9
*/
#define MODULEMD_YAML_ERROR modulemd_yaml_error_quark ()
/**
* modulemd_yaml_error_quark:
*
* Returns: A #GQuark used to identify an error in the modulemd yaml domain.
*
* Since: 2.9
*/
GQuark
modulemd_yaml_error_quark (void);
/**
* ModulemdYamlError:
* @MMD_YAML_ERROR_OPEN: Represents an error encountered while opening a
* YAML file.
* @MMD_YAML_ERROR_PROGRAMMING: Represents an internal programming error
* encountered while parsing a YAML document.
* @MMD_YAML_ERROR_UNPARSEABLE: Represents an error indicating that
* unexpected data or some other parsing error that violates the YAML spec
* was encountered while parsing a YAML document.
* @MMD_YAML_ERROR_PARSE: Represents an error indicating invalid data
* violating the modulemd YAML spec was encountered while parsing a YAML
* document.
* @MMD_YAML_ERROR_EMIT: Represents an error encountered while writing a
* YAML file.
* @MMD_YAML_ERROR_MISSING_REQUIRED: Represents an error indicating that
* required elements are missing while parsing a YAML document.
* @MMD_YAML_ERROR_EVENT_INIT: Represents an error indicating that a YAML
* output event could not be initialized.
* @MMD_YAML_ERROR_INCONSISTENT: Represents a data inconsistency error
* encountered while parsing a YAML document.
* @MMD_YAML_ERROR_UNKNOWN_ATTRS: While parsing a document in strict mode, an
* attribute was encountered that does not belong in this document.
*
* Since: 2.9
*/
typedef enum
{
MMD_YAML_ERROR_OPEN,
MMD_YAML_ERROR_PROGRAMMING,
MMD_YAML_ERROR_UNPARSEABLE,
MMD_YAML_ERROR_PARSE,
MMD_YAML_ERROR_EMIT,
MMD_YAML_ERROR_MISSING_REQUIRED,
MMD_YAML_ERROR_EVENT_INIT,
MMD_YAML_ERROR_INCONSISTENT,
MMD_YAML_ERROR_UNKNOWN_ATTR
} ModulemdYamlError;
/**
* ModulemdYamlErrorEnum:
* @MODULEMD_YAML_ERROR_OPEN: Represents an error encountered while opening a
* YAML file.
* @MODULEMD_YAML_ERROR_PROGRAMMING: Represents an internal programming error
* encountered while parsing a YAML document.
* @MODULEMD_YAML_ERROR_UNPARSEABLE: Represents an error indicating that
* unexpected data or some other parsing error was encountered while parsing a
* YAML document.
* @MODULEMD_YAML_ERROR_PARSE: Represents an error indicating invalid data was
* encountered while parsing a YAML document.
* @MODULEMD_YAML_ERROR_EMIT: Represents an error encountered while writing a
* YAML file.
* @MODULEMD_YAML_ERROR_MISSING_REQUIRED: Represents an error indicating that
* required elements are missing while parsing a YAML document.
* @MODULEMD_YAML_ERROR_EVENT_INIT: Represents an error indicating that a YAML
* output event could not be initialized.
* @MODULEMD_YAML_ERROR_INCONSISTENT: Represents a data inconsistency error
* encountered while parsing a YAML document.
*
* Since: 2.0
* Deprecated: 2.9
* Use #ModulemdYamlError instead.
*/
MMD_DEPRECATED_TYPE_FOR (ModulemdYamlError)
typedef enum
{
MODULEMD_YAML_ERROR_OPEN,
MODULEMD_YAML_ERROR_PROGRAMMING,
MODULEMD_YAML_ERROR_UNPARSEABLE,
MODULEMD_YAML_ERROR_PARSE,
MODULEMD_YAML_ERROR_EMIT,
MODULEMD_YAML_ERROR_MISSING_REQUIRED,
MODULEMD_YAML_ERROR_EVENT_INIT,
MODULEMD_YAML_ERROR_INCONSISTENT
} ModulemdYamlErrorEnum;
G_END_DECLS
|