Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
BaseException.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2025 - 2026 Deskflow Developers
4
* SPDX-FileCopyrightText: (C) 2012 - 2016 Synergy App 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 <stdexcept>
12
#include <string>
13
14
#include <QByteArray>
15
#include <QString>
16
18
21
class
BaseException
:
public
std::runtime_error
22
{
23
public
:
25
BaseException
();
27
explicit
BaseException
(
const
QString &msg);
28
~BaseException
() throw() override = default;
29
31
const
char
*
what
() const throw() override;
32
33
protected:
35
virtual QString
getWhat
() const noexcept
36
{
37
return
{};
38
}
39
41
46
virtual
QString
format
(
const
char
*
id
,
const
char
*defaultFormat, ...) const noexcept;
47
48
private:
49
mutable QByteArray m_what;
50
};
BaseException::getWhat
virtual QString getWhat() const noexcept
Get a human readable string describing the exception.
Definition
BaseException.h:35
BaseException::format
virtual QString format(const char *id, const char *defaultFormat,...) const noexcept
Format a string.
Definition
BaseException.cpp:38
BaseException::BaseException
BaseException()
Use getWhat() as the result of what().
Definition
BaseException.cpp:18
BaseException::what
const char * what() const override
Reason for exception.
Definition
BaseException.cpp:28
BaseException::~BaseException
~BaseException() override=default
src
lib
base
BaseException.h
Generated by
1.18.0