Commit 7a74b9ea authored by legoc's avatar legoc
Browse files

renamed ERROR into FAILURE

parent 0f4c74d2
...@@ -6,3 +6,4 @@ ...@@ -6,3 +6,4 @@
* Removed StateException, setRunning now returns a boolean. * Removed StateException, setRunning now returns a boolean.
* Added InvalidArgumentException to replace invalid_argument exception. * Added InvalidArgumentException to replace invalid_argument exception.
* Added SocketException thrown when the Server connect fails. * Added SocketException thrown when the Server connect fails.
* Renamed ERROR into FAILURE
\ No newline at end of file
...@@ -64,7 +64,7 @@ State This::parseState(const std::string& value) { ...@@ -64,7 +64,7 @@ State This::parseState(const std::string& value) {
} else if (value == "PROCESSING_ERROR") { } else if (value == "PROCESSING_ERROR") {
return PROCESSING_ERROR; return PROCESSING_ERROR;
} else if (value == "ERROR") { } else if (value == "ERROR") {
return ERROR; return FAILURE;
} else if (value == "SUCCESS") { } else if (value == "SUCCESS") {
return SUCCESS; return SUCCESS;
} else if (value == "STOPPED") { } else if (value == "STOPPED") {
...@@ -509,7 +509,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy ...@@ -509,7 +509,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy
if (m_lastState == SUCCESS if (m_lastState == SUCCESS
|| m_lastState == STOPPED || m_lastState == STOPPED
|| m_lastState == KILLED || m_lastState == KILLED
|| m_lastState == ERROR) { || m_lastState == FAILURE) {
// the application is already terminated // the application is already terminated
return m_lastState; return m_lastState;
} }
...@@ -546,7 +546,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy ...@@ -546,7 +546,7 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy
if (state == SUCCESS if (state == SUCCESS
|| state == STOPPED || state == STOPPED
|| state == KILLED || state == KILLED
|| state == ERROR) { || state == FAILURE) {
break; break;
} }
...@@ -793,7 +793,7 @@ std::auto_ptr<Subscriber> Subscriber::create(Instance & instance, const std::str ...@@ -793,7 +793,7 @@ std::auto_ptr<Subscriber> Subscriber::create(Instance & instance, const std::str
if (lastState == SUCCESS if (lastState == SUCCESS
|| lastState == STOPPED || lastState == STOPPED
|| lastState == KILLED || lastState == KILLED
|| lastState == ERROR) { || lastState == FAILURE) {
return auto_ptr<Subscriber>(0); return auto_ptr<Subscriber>(0);
} }
...@@ -1130,7 +1130,7 @@ std::string toString(cameo::application::State applicationStates) { ...@@ -1130,7 +1130,7 @@ std::string toString(cameo::application::State applicationStates) {
states.push_back("PROCESSING_ERROR"); states.push_back("PROCESSING_ERROR");
} }
if ((applicationStates & ERROR) != 0) { if ((applicationStates & FAILURE) != 0) {
states.push_back("ERROR"); states.push_back("ERROR");
} }
......
...@@ -72,7 +72,7 @@ const State RUNNING = 2; ...@@ -72,7 +72,7 @@ const State RUNNING = 2;
const State STOPPING = 4; const State STOPPING = 4;
const State KILLING = 8; const State KILLING = 8;
const State PROCESSING_ERROR = 16; const State PROCESSING_ERROR = 16;
const State ERROR = 32; const State FAILURE = 32;
const State SUCCESS = 64; const State SUCCESS = 64;
const State STOPPED = 128; const State STOPPED = 128;
const State KILLED = 256; const State KILLED = 256;
......
...@@ -154,7 +154,7 @@ bool SubscriberImpl::receiveBinary(std::string& data) { ...@@ -154,7 +154,7 @@ bool SubscriberImpl::receiveBinary(std::string& data) {
if (state == application::SUCCESS if (state == application::SUCCESS
|| state == application::STOPPED || state == application::STOPPED
|| state == application::KILLED || state == application::KILLED
|| state == application::ERROR) { || state == application::FAILURE) {
// Exit because the remote application has terminated. // Exit because the remote application has terminated.
return false; return false;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment