refactor: XMT Classes => MTException Classes
This commit is contained in:
@ -8,12 +8,12 @@ add_library(mt STATIC
|
||||
CondVar.h
|
||||
Lock.cpp
|
||||
Lock.h
|
||||
MTException.cpp
|
||||
MTException.h
|
||||
Mutex.cpp
|
||||
Mutex.h
|
||||
Thread.cpp
|
||||
Thread.h
|
||||
XMT.cpp
|
||||
XMT.h
|
||||
XThread.h
|
||||
)
|
||||
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "XMT.h"
|
||||
#include "MTException.h"
|
||||
|
||||
//
|
||||
// XMTThreadUnavailable
|
||||
// MTThreadUnavailableException
|
||||
//
|
||||
|
||||
std::string XMTThreadUnavailable::getWhat() const throw()
|
||||
std::string MTThreadUnavailableException::getWhat() const throw()
|
||||
{
|
||||
return format("XMTThreadUnavailable", "cannot create thread");
|
||||
return format("MTThreadUnavailableException", "cannot create thread");
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
@ -10,19 +11,19 @@
|
||||
#include "base/XBase.h"
|
||||
|
||||
/**
|
||||
* @brief XMT generic multithreading exception
|
||||
* @brief MTException generic multithreading exception
|
||||
*/
|
||||
class XMT : public XBase
|
||||
class MTException : public XBase
|
||||
{
|
||||
using XBase::XBase;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief XMTThreadUnavailable - Thrown when a thread cannot be created.
|
||||
* @brief MTThreadUnavailableException - Thrown when a thread cannot be created.
|
||||
*/
|
||||
class XMTThreadUnavailable : public XMT
|
||||
class MTThreadUnavailableException : public MTException
|
||||
{
|
||||
using XMT::XMT;
|
||||
using MTException::MTException;
|
||||
|
||||
protected:
|
||||
std::string getWhat() const throw() override;
|
||||
@ -10,7 +10,7 @@
|
||||
#include "arch/Arch.h"
|
||||
#include "base/IJob.h"
|
||||
#include "base/Log.h"
|
||||
#include "mt/XMT.h"
|
||||
#include "mt/MTException.h"
|
||||
#include "mt/XThread.h"
|
||||
#include <exception>
|
||||
|
||||
@ -24,7 +24,7 @@ Thread::Thread(IJob *job)
|
||||
if (m_thread == nullptr) {
|
||||
// couldn't create thread
|
||||
delete job;
|
||||
throw XMTThreadUnavailable();
|
||||
throw MTThreadUnavailableException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user