starting work on websocket chat reader
This commit is contained in:
43
ircexception.hpp
Normal file
43
ircexception.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user