bit7z 4.0.0
A C++ library for interfacing with the 7-zip shared libs.
Loading...
Searching...
No Matches
BitException Class Referencefinal

The BitException class represents a generic exception thrown from the bit7z classes. More...

#include <bit7z/bitexception.hpp>

+ Inheritance diagram for BitException:
+ Collaboration diagram for BitException:

Public Member Functions

 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, FailedFiles &&files={})
 Constructs a BitException object with the given message, and the specific files 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.
 
 BitException (const std::string &message, std::error_code code)
 Constructs a BitException object with the given message.
 
auto failedFiles () const noexcept -> const FailedFiles &
 
auto hresultCode () const noexcept -> HRESULT
 
auto nativeCode () const noexcept -> native_code_type
 
auto posixCode () const noexcept -> int
 

Detailed Description

The BitException class represents a generic exception thrown from the bit7z classes.

Constructor & Destructor Documentation

◆ BitException() [1/4]

BitException ( const char *  message,
std::error_code  code,
FailedFiles &&  files = {} 
)
explicit

Constructs a BitException object with the given message, and the specific files that failed.

Parameters
messagethe message associated with the exception object.
filesthe vector of files that failed, with the corresponding error codes.
codethe HRESULT code associated with the exception object.

◆ BitException() [2/4]

BitException ( const char *  message,
std::error_code  code,
tstring &&  file 
)

Constructs a BitException object with the given message, and the specific file that failed.

Parameters
messagethe message associated with the exception object.
codethe HRESULT code associated with the exception object.
filethe file that failed during the operation.

◆ BitException() [3/4]

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.

Parameters
messagethe message associated with the exception object.
codethe HRESULT code associated with the exception object.
filethe file that failed during the operation.

◆ BitException() [4/4]

BitException ( const std::string message,
std::error_code  code 
)
explicit

Constructs a BitException object with the given message.

Parameters
messagethe message associated with the exception object.
codethe HRESULT code associated with the exception object.

Member Function Documentation

◆ failedFiles()

auto failedFiles ( ) const -> const FailedFiles &
noexcept
Returns
the vector of files that caused the exception to be thrown, along with the corresponding error codes.

◆ hresultCode()

auto hresultCode ( ) const -> HRESULT
noexcept
Returns
the HRESULT error code corresponding to the exception's std::error_code.

◆ nativeCode()

auto nativeCode ( ) const -> native_code_type
noexcept
Returns
the native error code (e.g., HRESULT on Windows, int elsewhere) corresponding to the exception's std::error_code.

◆ posixCode()

auto posixCode ( ) const -> int
noexcept
Returns
the POSIX error code corresponding to the exception's std::error_code.

The documentation for this class was generated from the following file: