Files
qTier/invalididexception.hpp
2024-05-22 01:19:23 -05:00

40 lines
791 B
C++

#ifndef INVALIDIDEXCEPTION_HPP
#define INVALIDIDEXCEPTION_HPP
#include "tierrow.hpp"
#include "tiercard.hpp"
#include <QException>
class InvalidIdException : public QException
{
public:
InvalidIdException();
};
class InvalidRowIdException : public InvalidIdException
{
public:
InvalidRowIdException(TierRow::IdType id);
TierRow::IdType id() const;
const char* what() const noexcept override;
private:
const TierRow::IdType _id;
const std::string _what;
};
class InvalidCardIdException : public InvalidIdException
{
public:
InvalidCardIdException(TierCard::IdType id);
TierCard::IdType id() const;
const char* what() const noexcept override;
private:
const TierCard::IdType _id;
const std::string _what;
};
#endif // INVALIDIDEXCEPTION_HPP