Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
DeskflowException.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
5 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
6 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7 */
8
9#pragma once
10
11#include "base/BaseException.h"
12
16class DeskflowException : public BaseException
17{
19};
20
25{
26 using DeskflowException::DeskflowException;
27
28protected:
29 std::string getWhat() const throw() override;
30};
31
36{
37 using DeskflowException::DeskflowException;
38
39protected:
40 std::string getWhat() const throw() override;
41};
42
44
48{
49public:
50 IncompatibleClientException(int major, int minor);
51
53
54
56 int getMajor() const noexcept;
58 int getMinor() const noexcept;
59
61
62protected:
63 std::string getWhat() const throw() override;
64
65private:
66 int m_major;
67 int m_minor;
68};
69
71
76{
77public:
78 explicit DuplicateClientException(const std::string &name);
79 ~DuplicateClientException() throw() override = default;
80
82
83
85 virtual const std::string &getName() const noexcept;
86
88
89protected:
90 std::string getWhat() const throw() override;
91
92private:
93 std::string m_name;
94};
95
97
102{
103public:
104 explicit UnknownClientException(const std::string &name);
105 ~UnknownClientException() throw() override = default;
106
108
109
111 virtual const std::string &getName() const noexcept;
112
114
115protected:
116 std::string getWhat() const throw() override;
117
118private:
119 std::string m_name;
120};
121
123
129{
130public:
131 explicit ExitAppException(int code);
132 ~ExitAppException() throw() override = default;
133
135 int getCode() const noexcept;
136
137protected:
138 std::string getWhat() const throw() override;
139
140private:
141 int m_code;
142};
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:28
BadClientException - Thrown when the client fails to follow the protocol.
Definition DeskflowException.h:25
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:16
BaseException()
Use getWhat() as the result of what().
Definition BaseException.cpp:18
The DeskflowException class Generic deskflow exception class.
Definition DeskflowException.h:17
~DuplicateClientException() override=default
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:73
DuplicateClientException(const std::string &name)
Definition DeskflowException.cpp:63
virtual const std::string & getName() const noexcept
Get client's name.
Definition DeskflowException.cpp:68
int getCode() const noexcept
Get the exit code.
Definition DeskflowException.cpp:106
~ExitAppException() override=default
ExitAppException(int code)
Definition DeskflowException.cpp:101
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:111
int getMajor() const noexcept
Get client's major version number.
Definition DeskflowException.cpp:41
IncompatibleClientException(int major, int minor)
Definition DeskflowException.cpp:36
int getMinor() const noexcept
Get client's minor version number.
Definition DeskflowException.cpp:46
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:51
InvalidProtocolException - Thrown when the server protocol is unreconized.
Definition DeskflowException.h:36
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:25
std::string getWhat() const override
Get a human readable string describing the exception.
Definition DeskflowException.cpp:92
~UnknownClientException() override=default
UnknownClientException(const std::string &name)
Definition DeskflowException.cpp:82
virtual const std::string & getName() const noexcept
Get the client's name.
Definition DeskflowException.cpp:87
Definition Config.h:28