ThreadWeaver

exception.h
1/* -*- C++ -*-
2 Base class for exceptions in ThreadWeaver.
3
4 SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <mirko@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef EXCEPTION_H
10#define EXCEPTION_H
11
12#include <stdexcept>
13
14#include <QString>
15
16#include "threadweaver_export.h"
17
18namespace ThreadWeaver
19{
20class THREADWEAVER_EXPORT Exception : public std::runtime_error
21{
22public:
23 explicit Exception(const QString &message = QString());
24 ~Exception() throw() override;
25 QString message() const;
26
27private:
28 QString m_message;
29};
30
31class THREADWEAVER_EXPORT JobAborted : public Exception
32{
33public:
34 explicit JobAborted(const QString &message = QString());
35};
36
37class THREADWEAVER_EXPORT JobFailed : public Exception
38{
39public:
40 explicit JobFailed(const QString &message = QString());
41};
42
43// test:
44class AbortThread : public Exception
45{
46public:
47 AbortThread(const QString &message = QString());
48};
49
50}
51
52#endif // EXCEPTION_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.