aboutsummaryrefslogtreecommitdiff
path: root/src/errors/RLE_reader.hpp
blob: 39b4ddb06c96434ba20084a273a15ccc539c6d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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))
	{
	}
};