Definition at line 209 of file ClientMain.cpp. 00209 { 00210 cout << DateFormater::getDate() << "Performing halt operation for job with id " << jobId << "..." 00211 << endl; 00212 try { 00213 HaltRequest haltRequest(jobId); 00214 Message response; 00215 if (sendAndReceive("main",haltRequest,response)) { 00216 bool found = false; 00217 if ( !found ) try { 00218 Acknowledgement ack = response; 00219 cout << DateFormater::getDate() << "The server accepted the request for halt." << endl; 00220 found = true; 00221 } 00222 catch ( MessageCastException& e ) {} 00223 if ( !found ) try { 00224 Error err = response; 00225 cout << DateFormater::getDate() << "The server detected an error about the message:" << endl; 00226 cout << DateFormater::getDate() << err.getReason() << endl; 00227 found = true; 00228 } 00229 catch ( MessageCastException& e ) {} 00230 if ( !found ) { 00231 serviceNeeded = false; 00232 cout << DateFormater::getDate() << "Unexpected answer from the server." << endl; 00233 } 00234 } 00235 else { 00236 cout << DateFormater::getDate() << "Can't communicate with server." << endl; 00237 } 00238 } 00239 catch ( NetInterfaceException& e ) { 00240 cout << DateFormater::getDate() << "Request connection failed..." << endl; 00241 cout << DateFormater::getDate() << "NetInterface: "; 00242 e.print(); 00243 } 00244 }
|
1.5.1