Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
7a74b9ea
Commit
7a74b9ea
authored
Jul 26, 2016
by
legoc
Browse files
renamed ERROR into FAILURE
parent
0f4c74d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
7a74b9ea
...
...
@@ -6,3 +6,4 @@
* Removed StateException, setRunning now returns a boolean.
* Added InvalidArgumentException to replace invalid_argument exception.
* Added SocketException thrown when the Server connect fails.
* Renamed ERROR into FAILURE
\ No newline at end of file
src/cameo/Application.cpp
View file @
7a74b9ea
...
...
@@ -64,7 +64,7 @@ State This::parseState(const std::string& value) {
}
else
if
(
value
==
"PROCESSING_ERROR"
)
{
return
PROCESSING_ERROR
;
}
else
if
(
value
==
"ERROR"
)
{
return
ERROR
;
return
FAILURE
;
}
else
if
(
value
==
"SUCCESS"
)
{
return
SUCCESS
;
}
else
if
(
value
==
"STOPPED"
)
{
...
...
@@ -509,7 +509,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy
if
(
m_lastState
==
SUCCESS
||
m_lastState
==
STOPPED
||
m_lastState
==
KILLED
||
m_lastState
==
ERROR
)
{
||
m_lastState
==
FAILURE
)
{
// the application is already terminated
return
m_lastState
;
}
...
...
@@ -546,7 +546,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy
if
(
state
==
SUCCESS
||
state
==
STOPPED
||
state
==
KILLED
||
state
==
ERROR
)
{
||
state
==
FAILURE
)
{
break
;
}
...
...
@@ -793,7 +793,7 @@ std::auto_ptr<Subscriber> Subscriber::create(Instance & instance, const std::str
if
(
lastState
==
SUCCESS
||
lastState
==
STOPPED
||
lastState
==
KILLED
||
lastState
==
ERROR
)
{
||
lastState
==
FAILURE
)
{
return
auto_ptr
<
Subscriber
>
(
0
);
}
...
...
@@ -1130,7 +1130,7 @@ std::string toString(cameo::application::State applicationStates) {
states
.
push_back
(
"PROCESSING_ERROR"
);
}
if
((
applicationStates
&
ERROR
)
!=
0
)
{
if
((
applicationStates
&
FAILURE
)
!=
0
)
{
states
.
push_back
(
"ERROR"
);
}
...
...
src/cameo/Application.h
View file @
7a74b9ea
...
...
@@ -72,7 +72,7 @@ const State RUNNING = 2;
const
State
STOPPING
=
4
;
const
State
KILLING
=
8
;
const
State
PROCESSING_ERROR
=
16
;
const
State
ERROR
=
32
;
const
State
FAILURE
=
32
;
const
State
SUCCESS
=
64
;
const
State
STOPPED
=
128
;
const
State
KILLED
=
256
;
...
...
src/cameo/impl/SubscriberImpl.cpp
View file @
7a74b9ea
...
...
@@ -154,7 +154,7 @@ bool SubscriberImpl::receiveBinary(std::string& data) {
if
(
state
==
application
::
SUCCESS
||
state
==
application
::
STOPPED
||
state
==
application
::
KILLED
||
state
==
application
::
ERROR
)
{
||
state
==
application
::
FAILURE
)
{
// Exit because the remote application has terminated.
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment