You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
868 B
48 lines
868 B
2 years ago
|
#pragma once
|
||
|
|
||
|
#include <exception>
|
||
|
#include <string>
|
||
|
|
||
|
namespace mshio {
|
||
|
|
||
|
struct InvalidFormat : public std::exception
|
||
|
{
|
||
|
public:
|
||
|
InvalidFormat(const std::string& message)
|
||
|
: m_message(message)
|
||
|
{}
|
||
|
|
||
|
const char* what() const noexcept override { return m_message.c_str(); }
|
||
|
|
||
|
private:
|
||
|
std::string m_message;
|
||
|
};
|
||
|
|
||
|
struct UnsupportedFeature : public std::exception
|
||
|
{
|
||
|
public:
|
||
|
UnsupportedFeature(const std::string& message)
|
||
|
: m_message(message)
|
||
|
{}
|
||
|
|
||
|
const char* what() const noexcept override { return m_message.c_str(); }
|
||
|
|
||
|
private:
|
||
|
std::string m_message;
|
||
|
};
|
||
|
|
||
|
struct CorruptData : public std::exception
|
||
|
{
|
||
|
public:
|
||
|
CorruptData(const std::string& message)
|
||
|
: m_message(message)
|
||
|
{}
|
||
|
|
||
|
const char* what() const noexcept override { return m_message.c_str(); }
|
||
|
|
||
|
private:
|
||
|
std::string m_message;
|
||
|
};
|
||
|
|
||
|
} // namespace mshio
|