]> git.lizzy.rs Git - dragonfireclient.git/blob - src/network/networkexceptions.h
Merge pull request #59 from PrairieAstronomer/readme_irrlicht_change
[dragonfireclient.git] / src / network / networkexceptions.h
1 /*
2 Minetest
3 Copyright (C) 2013-2017 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #pragma once
21
22 #include "exceptions.h"
23
24 namespace con
25 {
26 /*
27         Exceptions
28 */
29 class NotFoundException : public BaseException
30 {
31 public:
32         NotFoundException(const char *s) : BaseException(s) {}
33 };
34
35 class PeerNotFoundException : public BaseException
36 {
37 public:
38         PeerNotFoundException(const char *s) : BaseException(s) {}
39 };
40
41 class ConnectionException : public BaseException
42 {
43 public:
44         ConnectionException(const char *s) : BaseException(s) {}
45 };
46
47 class ConnectionBindFailed : public BaseException
48 {
49 public:
50         ConnectionBindFailed(const char *s) : BaseException(s) {}
51 };
52
53 class InvalidIncomingDataException : public BaseException
54 {
55 public:
56         InvalidIncomingDataException(const char *s) : BaseException(s) {}
57 };
58
59 class NoIncomingDataException : public BaseException
60 {
61 public:
62         NoIncomingDataException(const char *s) : BaseException(s) {}
63 };
64
65 class ProcessedSilentlyException : public BaseException
66 {
67 public:
68         ProcessedSilentlyException(const char *s) : BaseException(s) {}
69 };
70
71 class ProcessedQueued : public BaseException
72 {
73 public:
74         ProcessedQueued(const char *s) : BaseException(s) {}
75 };
76
77 class IncomingDataCorruption : public BaseException
78 {
79 public:
80         IncomingDataCorruption(const char *s) : BaseException(s) {}
81 };
82 }
83
84 class SocketException : public BaseException
85 {
86 public:
87         SocketException(const std::string &s) : BaseException(s) {}
88 };
89
90 class ResolveError : public BaseException
91 {
92 public:
93         ResolveError(const std::string &s) : BaseException(s) {}
94 };
95
96 class SendFailedException : public BaseException
97 {
98 public:
99         SendFailedException(const std::string &s) : BaseException(s) {}
100 };