Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
8ec172e5
Commit
8ec172e5
authored
6 years ago
by
Grigoris Pavlakis
Browse files
Options
Downloads
Patches
Plain Diff
Revert error handler and ServiceTests to their original versions
parent
8ba9246c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.idea/codeStyles/Project.xml
+19
-0
19 additions, 0 deletions
.idea/codeStyles/Project.xml
src/ErrorHandler.cpp
+4
-0
4 additions, 0 deletions
src/ErrorHandler.cpp
test/Services/ServiceTests.hpp
+1
-20
1 addition, 20 deletions
test/Services/ServiceTests.hpp
with
24 additions
and
20 deletions
.idea/codeStyles/Project.xml
0 → 100644
+
19
−
0
View file @
8ec172e5
<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
This diff is collapsed.
Click to expand it.
src/ErrorHandler.cpp
+
4
−
0
View file @
8ec172e5
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
test/Services/ServiceTests.hpp
+
1
−
20
View file @
8ec172e5
...
...
@@ -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 list
s
, 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
();
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment