more updates
This commit is contained in:
39
invalididexception.hpp
Normal file
39
invalididexception.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user