Tidying
This commit is contained in:
@@ -13,13 +13,13 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
|||||||
class ClientCommunicationError: public Bloom::Exceptions::Exception
|
class ClientCommunicationError: public Bloom::Exceptions::Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ClientCommunicationError(const std::string& message): Bloom::Exceptions::Exception(message) {
|
explicit ClientCommunicationError(const std::string& message)
|
||||||
this->message = message;
|
: Bloom::Exceptions::Exception(message)
|
||||||
}
|
{}
|
||||||
|
|
||||||
explicit ClientCommunicationError(const char* message): Bloom::Exceptions::Exception(message) {
|
explicit ClientCommunicationError(const char* message)
|
||||||
this->message = std::string(message);
|
: Bloom::Exceptions::Exception(message)
|
||||||
}
|
{}
|
||||||
|
|
||||||
explicit ClientCommunicationError() = default;
|
explicit ClientCommunicationError() = default;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,14 +14,6 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
|||||||
class ClientDisconnected: public Bloom::Exceptions::Exception
|
class ClientDisconnected: public Bloom::Exceptions::Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ClientDisconnected(const std::string& message): Bloom::Exceptions::Exception(message) {
|
|
||||||
this->message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit ClientDisconnected(const char* message): Bloom::Exceptions::Exception(message) {
|
|
||||||
this->message = std::string(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit ClientDisconnected() = default;
|
explicit ClientDisconnected() = default;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
|||||||
class ClientNotSupported: public Bloom::Exceptions::Exception
|
class ClientNotSupported: public Bloom::Exceptions::Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ClientNotSupported(const std::string& message): Bloom::Exceptions::Exception(message) {
|
explicit ClientNotSupported(const std::string& message)
|
||||||
this->message = message;
|
: Bloom::Exceptions::Exception(message)
|
||||||
}
|
{}
|
||||||
|
|
||||||
explicit ClientNotSupported(const char* message): Bloom::Exceptions::Exception(message) {
|
explicit ClientNotSupported(const char* message)
|
||||||
this->message = std::string(message);
|
: Bloom::Exceptions::Exception(message)
|
||||||
}
|
{}
|
||||||
|
|
||||||
explicit ClientNotSupported() = default;
|
explicit ClientNotSupported() = default;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ namespace Bloom::DebugServer::Gdb
|
|||||||
this->targetControllerConsole.resetTarget();
|
this->targetControllerConsole.resetTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto commandPacket = this->waitForCommandPacket();
|
const auto commandPacket = this->waitForCommandPacket();
|
||||||
|
|
||||||
if (commandPacket) {
|
if (commandPacket) {
|
||||||
commandPacket->handle(this->activeDebugSession.value(), this->targetControllerConsole);
|
commandPacket->handle(this->activeDebugSession.value(), this->targetControllerConsole);
|
||||||
|
|||||||
@@ -11,14 +11,6 @@ namespace Bloom::Exceptions
|
|||||||
: std::runtime_error("")
|
: std::runtime_error("")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~Exception() = default;
|
|
||||||
|
|
||||||
Exception(const Exception& other) noexcept = default;
|
|
||||||
Exception(Exception&& other) = default;
|
|
||||||
|
|
||||||
Exception& operator = (const Exception& other) = default;
|
|
||||||
Exception& operator = (Exception&& other) = default;
|
|
||||||
|
|
||||||
explicit Exception(const std::string& message)
|
explicit Exception(const std::string& message)
|
||||||
: std::runtime_error(message.c_str())
|
: std::runtime_error(message.c_str())
|
||||||
, message(message)
|
, message(message)
|
||||||
@@ -29,11 +21,19 @@ namespace Bloom::Exceptions
|
|||||||
, message(std::string(message))
|
, message(std::string(message))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
virtual ~Exception() = default;
|
||||||
|
|
||||||
|
Exception(const Exception& other) noexcept = default;
|
||||||
|
Exception(Exception&& other) = default;
|
||||||
|
|
||||||
|
Exception& operator = (const Exception& other) = default;
|
||||||
|
Exception& operator = (Exception&& other) = default;
|
||||||
|
|
||||||
const char* what() const noexcept override {
|
const char* what() const noexcept override {
|
||||||
return this->message.c_str();
|
return this->message.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getMessage() const {
|
const std::string& getMessage() const {
|
||||||
return this->message;
|
return this->message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user