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

renamed ERROR into FAILURE

parent 0f4c74d2
......@@ -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
......@@ -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");
}
......
......@@ -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;
......
......@@ -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;
}
......
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