#pragma once

#include "../exception_base.hpp"

namespace dv::exceptions {

namespace info {
struct IOError : EmptyException {};
} // namespace info

using IOError = internal::Exception_<info::IOError>;

namespace info {
struct InputError {
	struct ErrorInfo {
		std::string mName;
		std::string mTypeIdentifier;
	};

	using Info = ErrorInfo;

	static std::string format(const Info &info) {
		return fmt::format("Input: (name: {:s}, type: {:s})", info.mName, info.mTypeIdentifier);
	}
};
} // namespace info

using InputError = internal::Exception_<info::InputError, IOError>;

namespace info {
struct OutputError {
	struct ErrorInfo {
		std::string mName;
		std::string mTypeIdentifier;
	};

	using Info = ErrorInfo;

	static std::string format(const Info &info) {
		return fmt::format("Output: (name: {:s}, type: {:s})", info.mName, info.mTypeIdentifier);
	}
};
} // namespace info

using OutputError = internal::Exception_<info::OutputError, IOError>;

} // namespace dv::exceptions
