]> git.lizzy.rs Git - minetest.git/blob - src/network/networkexceptions.h
Formspec: Make dropdowns optionally return event based on index, not value (#9496)
[minetest.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 InvalidOutgoingDataException : public BaseException
60 {
61 public:
62         InvalidOutgoingDataException(const char *s) : BaseException(s) {}
63 };
64
65 class NoIncomingDataException : public BaseException
66 {
67 public:
68         NoIncomingDataException(const char *s) : BaseException(s) {}
69 };
70
71 class ProcessedSilentlyException : public BaseException
72 {
73 public:
74         ProcessedSilentlyException(const char *s) : BaseException(s) {}
75 };
76
77 class ProcessedQueued : public BaseException
78 {
79 public:
80         ProcessedQueued(const char *s) : BaseException(s) {}
81 };
82
83 class IncomingDataCorruption : public BaseException
84 {
85 public:
86         IncomingDataCorruption(const char *s) : BaseException(s) {}
87 };
88 }
89
90 class SocketException : public BaseException
91 {
92 public:
93         SocketException(const std::string &s) : BaseException(s) {}
94 };
95
96 class ResolveError : public BaseException
97 {
98 public:
99         ResolveError(const std::string &s) : BaseException(s) {}
100 };
101
102 class SendFailedException : public BaseException
103 {
104 public:
105         SendFailedException(const std::string &s) : BaseException(s) {}
106 };