libaria2cpp 0.2.0
Basic CPP library to connect to an ARIA2 daemon via the RPC interface.
aria2cppexception.h
1/*
2 * ARIA2CPP: Basic CPP library to connect to an ARIA2 daemon
3 * via the RPC interface.
4 *
5 * *ALPHA VERSION!*
6 *
7 * Copyright (C) 2021 Dennis Katsonis dennisk@netspace.net.au
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#ifndef ARIA2EXC_H_
25#define ARIA2EXC_H_
26
27#include <jsonrpccpp/client/connectors/httpclient.h>
28
29class Aria2CPPException : public std::exception
30{
31public:
32 Aria2CPPException(const jsonrpc::JsonRpcException &e, std::string error = "");
33 Aria2CPPException(const std::string &e);
34 std::string GetCode();
35 std::string GetMessage();
36 Json::Value GetData();
37 const char* what() const throw ();
38
39protected:
40 std::string m_code;
41 Json::Value m_data;
42 std::string m_message;
43 std::string m_whatString;
44 std::string m_JsonwhatString;
45
46};
47
48#endif //ARIA2EXC_H_
Definition: aria2cppexception.h:30