44 lines
914 B
C++
44 lines
914 B
C++
#ifndef IRCEXCEPTIONS_HPP
|
|
#define IRCEXCEPTIONS_HPP
|
|
|
|
#include "ircmessagetype.hpp"
|
|
|
|
#include <QException>
|
|
|
|
class IrcException : public QException
|
|
{
|
|
public:
|
|
const char* what() const noexcept override;
|
|
protected:
|
|
IrcException(QString _what);
|
|
const QByteArray _what;
|
|
};
|
|
|
|
class IrcParseException : public IrcException
|
|
{
|
|
public:
|
|
IrcParseException(QString message, QString description);
|
|
const QString message;
|
|
const QString description;
|
|
|
|
private:
|
|
static QString _makeWhat(QString message, QString description="");
|
|
};
|
|
|
|
class IrcTagNotFoundException : public IrcException
|
|
{
|
|
public:
|
|
IrcTagNotFoundException(QString tag);
|
|
const QString tag;
|
|
};
|
|
|
|
class IrcIncorrectTypeException : public IrcException
|
|
{
|
|
public:
|
|
IrcIncorrectTypeException(IrcMessageType expected, IrcMessageType actual);
|
|
const IrcMessageType expected;
|
|
const IrcMessageType actual;
|
|
};
|
|
|
|
#endif // IRCEXCEPTIONS_HPP
|