Tidied exceptions

This commit is contained in:
Nav
2024-11-23 21:09:33 +00:00
parent 9aef4be2f1
commit 282086eaa2
8 changed files with 40 additions and 16 deletions

View File

@@ -69,6 +69,7 @@
#include "Exceptions/DebugServerInterrupted.hpp"
#include "src/Exceptions/Exception.hpp"
#include "src/Exceptions/FatalErrorException.hpp"
#include "src/Exceptions/InvalidConfig.hpp"
namespace DebugServer::Gdb
@@ -288,6 +289,10 @@ namespace DebugServer::Gdb
// Server was interrupted by an event
Logger::debug("GDB RSP interrupted");
return;
} catch (const ::Exceptions::FatalErrorException& exception) {
this->endDebugSession();
throw exception;
}
}
@@ -547,6 +552,10 @@ namespace DebugServer::Gdb
Logger::debug("GDB RSP interrupted");
return;
} catch (const ::Exceptions::FatalErrorException& exception) {
this->endDebugSession();
throw exception;
} catch (const ::Exceptions::Exception& exception) {
Logger::error("Failed to handle target execution state changed event - " + exception.getMessage());
}