Renamed DebugSessionAborted GDB exception

This commit is contained in:
Nav
2022-11-17 00:13:12 +00:00
parent f2d09641a1
commit 7a2e8f07b5
3 changed files with 34 additions and 30 deletions

View File

@@ -1,26 +0,0 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* The GDB server may abort a debug session with the client, if an internal error occurs. One circumstance where
* this can happen is when the TargetController is not able to service the debug session for whatever reason.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class DebugSessionAborted: public Bloom::Exceptions::Exception
{
public:
explicit DebugSessionAborted(const std::string& message): Bloom::Exceptions::Exception(message) {
this->message = message;
}
explicit DebugSessionAborted(const char* message): Bloom::Exceptions::Exception(message) {
this->message = std::string(message);
}
explicit DebugSessionAborted() = default;
};
}

View File

@@ -0,0 +1,30 @@
#pragma once
#include "src/Exceptions/Exception.hpp"
namespace Bloom::DebugServer::Gdb::Exceptions
{
/**
* The GDB server may fail to prepare for a debug session, if an internal error occurs. One circumstance where
* this can happen is when the TargetController is not able to service the debug session for whatever reason.
*
* See GdbRspDebugServer::serve() for handling code.
*/
class DebugSessionInitialisationFailure: public Bloom::Exceptions::Exception
{
public:
explicit DebugSessionInitialisationFailure(const std::string& message)
: Bloom::Exceptions::Exception(message)
{
this->message = message;
}
explicit DebugSessionInitialisationFailure(const char* message)
: Bloom::Exceptions::Exception(message)
{
this->message = std::string(message);
}
explicit DebugSessionInitialisationFailure() = default;
};
}