Skip to content
Snippets Groups Projects
Commit 8ec172e5 authored by Grigoris Pavlakis's avatar Grigoris Pavlakis
Browse files

Revert error handler and ServiceTests to their original versions

parent 8ba9246c
No related branches found
No related tags found
No related merge requests found
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="RIGHT_MARGIN" value="100" />
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<Objective-C-extensions>
<extensions>
<pair source="cpp" header="hpp" fileNamingConvention="PASCAL_CASE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
<codeStyleSettings language="ObjectiveC">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
......@@ -42,6 +42,10 @@ void ErrorHandler::reportError(const Message &message, RoutingErrorType errorCod
logError(message, errorCode);
}
void ErrorHandler::reportInternalError(ErrorHandler::InternalErrorType errorCode) {
logError(UnknownInternalError);
}
template<typename ErrorType>
void ErrorHandler::logError(const Message &message, ErrorType errorType) {
std::cerr
......
......@@ -3,7 +3,6 @@
#include <vector>
#include <Message.hpp>
#include <ErrorHandler.hpp>
/**
* Supporting class for tests against ECSS services
......@@ -12,7 +11,6 @@
*/
class ServiceTests {
static std::vector<Message> queuedMessages;
static std::vector<ErrorHandler::InternalErrorType> internalErrors;
public:
/**
......@@ -23,15 +21,6 @@ public:
return queuedMessages.at(number);
}
/**
* Get an error from the list of logged errors
* @param number The number of the error, starting from 0 in chronological order
*/
static ErrorHandler::InternalErrorType &getError(uint64_t number) { // uint32 just for
// overloading
return internalErrors.at(number);
}
/**
* Add a message to the queue of messages to be sent
*/
......@@ -39,13 +28,6 @@ public:
queuedMessages.push_back(message);
}
/**
* Add an error to the queue of logged errors
*/
static void storeError(const ErrorHandler::InternalErrorType &error) {
internalErrors.push_back(error);
}
/**
* Counts the number of messages in the queue
*/
......@@ -61,11 +43,10 @@ public:
}
/**
* Remove all the queued messages and errors from the lists, starting over from 0 items again
* Remove all the queued messages from the list, starting over from 0 items again
*/
static void reset() {
queuedMessages.clear();
internalErrors.clear();
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment