qTbot 0.2.107.d8fc923
qTbot is base back end library for your c++ Qt projects.
httpexception.h
Go to the documentation of this file.
1//#
2//# Copyright (C) 2023-2024 QuasarApp.
3//# Distributed under the GPLv3 software license, see the accompanying
4//# Everyone is permitted to copy and distribute verbatim copies
5//# of this license document, but changing it is not allowed.
6//#
7
8#include <QException>
9#include <QNetworkReply>
10
11
12#ifndef HTTPEXCEPTION_H
13#define HTTPEXCEPTION_H
14
15namespace qTbot {
16
20class HttpException: public QException
21{
22public:
23 HttpException(QNetworkReply::NetworkError code, const QByteArray& erroString = {});
24
25 // exception interface
26public:
27 const char *what() const noexcept override;
28
29 // QException interface
30public:
31 void raise() const override;
32 QException *clone() const override;
33
34 QNetworkReply::NetworkError code() const;
35
36private:
37 QByteArray _errText;
38 QNetworkReply::NetworkError _code;
39};
40}
41#endif // HTTPEXCEPTION_H
The HttpException class is base exaption that will raise on all errors of the HTTP protocol,...
QException * clone() const override
const char * what() const noexcept override
void raise() const override
QNetworkReply::NetworkError code() const