qTbot
0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
Toggle main menu visibility
httpexception.h
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2023-2026 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
15
namespace
qTbot
{
16
20
class
HttpException
:
public
QException
21
{
22
public
:
28
HttpException
(QNetworkReply::NetworkError
code
,
const
QByteArray& erroString = {});
29
30
// exception interface
31
public
:
36
const
char
*
what
()
const
noexcept
override
;
37
38
// QException interface
39
public
:
43
void
raise
()
const override
;
44
49
QException *
clone
()
const override
;
50
55
QNetworkReply::NetworkError
code
()
const
;
56
57
private
:
58
QByteArray _errText;
59
QNetworkReply::NetworkError _code;
60
};
61
}
62
#endif
// HTTPEXCEPTION_H
qTbot::HttpException::clone
QException * clone() const override
clone Creates a copy of the exception.
Definition
httpexception.cpp:34
qTbot::HttpException::what
const char * what() const noexcept override
what Returns the text description of the error.
Definition
httpexception.cpp:26
qTbot::HttpException::raise
void raise() const override
raise Raises the exception.
Definition
httpexception.cpp:30
qTbot::HttpException::HttpException
HttpException(QNetworkReply::NetworkError code, const QByteArray &erroString={})
HttpException constructs the exception with an http error code and an error description.
Definition
httpexception.cpp:12
qTbot::HttpException::code
QNetworkReply::NetworkError code() const
code Returns the network error code.
Definition
httpexception.cpp:39
qTbot
Definition
telegramdeletemessage.cpp:8
src
qTbot
src
public
qTbot
httpexception.h
Generated by
1.18.0