From 927e065f9829045247be7c0b3296408b6f577c1f Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 12 Jun 2022 13:44:58 +0200 Subject: feat: add reading RLE files --- src/errors/RLE_reader.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/errors/RLE_reader.hpp (limited to 'src/errors/RLE_reader.hpp') 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 + +#include +#include +#include + +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)) + { + } +}; -- cgit v1.2.3-18-g5258