File exceptions.hpp¶
File List > backends > cxx > include > zmbt > core > exceptions.hpp
Go to the documentation of this file
#ifndef ZMBT_CORE_EXCEPTIONS_HPP_
#define ZMBT_CORE_EXCEPTIONS_HPP_
#include <array>
#include <type_traits>
#include "aliases.hpp"
#include "format_string.hpp"
namespace zmbt {
struct base_error : public std::runtime_error {
using std::runtime_error::runtime_error;
template <class... A>
base_error(boost::json::string_view fmtstr, A&&... args) : std::runtime_error(format(fmtstr, std::forward<A>(args)...))
{
}
};
struct serialization_error : public base_error {
using base_error::base_error;
};
} // namespace zmbt
#endif