| 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 | #include "exception.h" |
| 10 | |
| 11 | namespace ThreadWeaver |
| 12 | { |
| 13 | Exception::Exception(const QString &message) |
| 14 | : std::runtime_error(message.toStdString()) |
| 15 | , m_message(message) |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | Exception::~Exception() throw() |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | QString Exception::message() const |
| 24 | { |
| 25 | return m_message; |
| 26 | } |
| 27 | |
| 28 | JobAborted::JobAborted(const QString &message) |
| 29 | : Exception(message) |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | JobFailed::JobFailed(const QString &message) |
| 34 | : Exception(message) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | AbortThread::AbortThread(const QString &message) |
| 39 | : Exception(message) |
| 40 | { |
| 41 | } |
| 42 | |
| 43 | } |
| 44 |
