10#ifndef BITEXCEPTION_HPP
11#define BITEXCEPTION_HPP
13#include "bitdefines.hpp"
14#include "bittypes.hpp"
15#include "bitwindows.hpp"
20#include <system_error>
57 using native_code_type = HRESULT;
59 using native_code_type = int;
101 BIT7Z_NODISCARD
auto nativeCode() const noexcept -> native_code_type;
auto hresultCode() const noexcept -> HRESULT
auto posixCode() const noexcept -> int
BitException(const std::string &message, std::error_code code)
Constructs a BitException object with the given message.
auto failedFiles() const noexcept -> const FailedFiles &
auto nativeCode() const noexcept -> native_code_type
BitException(const char *message, std::error_code code, FailedFiles &&files={})
Constructs a BitException object with the given message, and the specific files that failed.
BitException(const char *message, std::error_code code, const tstring &file)
Constructs a BitException object with the given message, and the specific file that failed.
BitException(const char *message, std::error_code code, tstring &&file)
Constructs a BitException object with the given message, and the specific file that failed.
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
std::pair< tstring, std::error_code > FailedFile
An alias for a pair holding: 1) the path or identifier of a file (tstring) 2) the error that occurred...
Definition bitexception.hpp:28
auto lastErrorCode() noexcept -> std::error_code
Returns a std::error_code corresponding to the last system error that occurred.
std::basic_string< tchar > tstring
Definition bittypes.hpp:104
auto make_hresult_code(HRESULT res) noexcept -> std::error_code
Creates a std::error_code from the given HRESULT value.
std::vector< FailedFile > FailedFiles
An alias for a sequence of FailedFile entries.
Definition bitexception.hpp:33
T system_error(T... args)