bit7z 4.1.0
A C++ library for interfacing with the 7-zip shared libs.
Loading...
Searching...
No Matches
biterror.hpp
1/*
2 * bit7z - A C++ static library to interface with the 7-zip shared libraries.
3 * Copyright (c) Riccardo Ostani - All Rights Reserved.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef BITERROR_HPP
11#define BITERROR_HPP
12
13#include "bitdefines.hpp"
14
15#include <cstdint>
16#include <system_error>
17#include <type_traits>
18
19namespace bit7z {
20
52
60auto make_error_code( BitError error ) noexcept -> std::error_code;
61
82
91
92} // namespace bit7z
93
94namespace std {
95template<>
96struct BIT7Z_MAYBE_UNUSED is_error_code_enum< bit7z::BitError > : std::true_type {};
97
98template<>
99struct BIT7Z_MAYBE_UNUSED is_error_condition_enum< bit7z::BitFailureSource > : std::true_type {};
100} // namespace std
101
102#endif //BITERROR_HPP
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
auto make_error_code(BitError error) noexcept -> std::error_code
Creates a std::error_code from the given BitError value.
auto make_error_condition(BitFailureSource failureSource) noexcept -> std::error_condition
Creates a std::error_condition from the given BitFailureSource value.
BitError
The BitError enum struct values represent bit7z specific errors.
Definition biterror.hpp:24
@ InvalidCompressionMethod
Invalid compression method for the chosen archive format.
Definition biterror.hpp:31
@ NonEmptyOutputBuffer
The given output buffer is not empty.
Definition biterror.hpp:40
@ InvalidItemPath
The item has an invalid path.
Definition biterror.hpp:50
@ UnsupportedVariantType
Unsupported variant type.
Definition biterror.hpp:44
@ IndicesNotSpecified
No item indices were specified.
Definition biterror.hpp:28
@ InvalidDirectoryPath
Invalid directory path.
Definition biterror.hpp:47
@ ItemHasAbsolutePath
The item has an absolute path.
Definition biterror.hpp:49
@ NoMatchingFile
No matching file was found in the archive.
Definition biterror.hpp:38
@ NullOutputBuffer
The given output buffer is null.
Definition biterror.hpp:41
@ FilterNotSpecified
No item filter was specified.
Definition biterror.hpp:26
@ InvalidDictionarySize
Invalid dictionary size for the chosen compression method.
Definition biterror.hpp:32
@ RequestedWrongVariantType
The wrong variant type was requested.
Definition biterror.hpp:42
@ NoMatchingSignature
No known archive signature was found.
Definition biterror.hpp:39
@ FormatFeatureNotSupported
The requested feature is not supported by the archive format.
Definition biterror.hpp:27
@ ItemMarkedAsDeleted
The item is marked as deleted.
Definition biterror.hpp:36
@ InvalidArchivePath
Invalid archive path.
Definition biterror.hpp:29
@ InvalidOutputBufferSize
Invalid output buffer size.
Definition biterror.hpp:30
@ WrongUpdateMode
Wrong update mode.
Definition biterror.hpp:45
@ Fail
Unspecified error.
Definition biterror.hpp:25
@ NoMatchingItems
No matching item was found in the archive.
Definition biterror.hpp:37
@ InvalidZipPassword
The Zip format only supports printable ASCII characters in passwords.
Definition biterror.hpp:46
@ ItemIsAFolder
The item is a folder, but a file was expected.
Definition biterror.hpp:35
@ InvalidIndex
Invalid item index.
Definition biterror.hpp:33
@ ItemPathOutsideOutputDirectory
The extracted item path would be outside the output directory.
Definition biterror.hpp:48
@ UnsupportedOperation
Unsupported operation.
Definition biterror.hpp:43
@ InvalidWordSize
Invalid word size for the chosen compression method.
Definition biterror.hpp:34
BitFailureSource
The BitFailureSource enum struct values represent bit7z error conditions.
Definition biterror.hpp:67
@ HeadersError
An error was encountered while reading the archive headers.
Definition biterror.hpp:74
@ InvalidArgument
An invalid argument was provided.
Definition biterror.hpp:72
@ UnexpectedEnd
An unexpected end of data was reached.
Definition biterror.hpp:79
@ OperationNotPermitted
The requested operation is not permitted.
Definition biterror.hpp:77
@ InvalidArchive
The input is not a valid archive.
Definition biterror.hpp:71
@ DataError
A data error was encountered.
Definition biterror.hpp:70
@ CRCError
A CRC check failed.
Definition biterror.hpp:68
@ WrongPassword
A wrong password was provided.
Definition biterror.hpp:80
@ FormatDetectionError
The archive format could not be detected.
Definition biterror.hpp:73
@ DataAfterEnd
Some data was found after the end of the payload data.
Definition biterror.hpp:69
@ OperationNotSupported
The requested operation is not supported.
Definition biterror.hpp:76
@ UnavailableData
The requested data is unavailable.
Definition biterror.hpp:78
@ NoSuchItem
The requested item does not exist.
Definition biterror.hpp:75