Pasha Bibko Util Library
|
Error returned when PashaBibko::Util::ReadFile() fails. More...
#include <FileRead.h>
Public Types | |
enum | Reason { FileNotFound , PermissionDenied , NotAFile } |
Different reasons why the error can occur. More... | |
Public Member Functions | |
FileReadError (const std::filesystem::path &_path, Reason _reason) | |
Static Public Member Functions | |
static const char *const | ReasonStr (Reason reason) |
Converts a FileReadError::Reason into a relevant c-string. | |
Public Attributes | |
const std::filesystem::path | path |
Absolute file path of the error. | |
const Reason | reason |
Why the file read failed. | |
Error returned when PashaBibko::Util::ReadFile() fails.
Contains the absolute path of the file that was attempted to read as well as why the file read failed.
FileReadError | ( | const std::filesystem::path & | _path, |
Reason | _reason | ||
) |
_path | The absolute file path that was tried to read from. |
_reason | Why the file read failed. |
Converts a FileReadError::Reason into a relevant c-string.
const std::filesystem::path path |
Absolute file path of the error.