diff options
Diffstat (limited to 'src/errors/RLE_reader.hpp')
-rw-r--r-- | src/errors/RLE_reader.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/errors/RLE_reader.hpp b/src/errors/RLE_reader.hpp new file mode 100644 index 0000000..39b4ddb --- /dev/null +++ b/src/errors/RLE_reader.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include <fmt/core.h> + +#include <filesystem> +#include <stdexcept> +#include <string_view> + +class InvalidRLEFileError : public std::runtime_error +{ +public: + explicit InvalidRLEFileError( + const std::filesystem::path &path, + const std::string_view &reason) noexcept + : std::runtime_error( + fmt::format("Invalid RLE file '{}'. {}", path.string(), reason)) + { + } +}; |