Definition at line 172 of file ClientMain.cpp. 00172 { 00173 cout << DateFormater::getDate() << "Performing status operation for job with id " << jobId << "..." 00174 << endl; 00175 try { 00176 StatusRequest statusRequest(jobId); 00177 Message response; 00178 if (sendAndReceive("main",statusRequest,response)) { 00179 bool found = false; 00180 if ( !found ) try { 00181 StatusOffer so = response; 00182 cout << DateFormater::getDate() << "Status: \"" << so.getStatus() << "\"" << endl; 00183 found = true; 00184 } 00185 catch ( MessageCastException& e ) {} 00186 if ( !found ) try { 00187 Error err = response; 00188 cout << DateFormater::getDate() << "The server detected an error about the message:" << endl; 00189 cout << DateFormater::getDate() << err.getReason() << endl; 00190 found = true; 00191 } 00192 catch ( MessageCastException& e ) {} 00193 if ( !found ) { 00194 serviceNeeded = false; 00195 cout << DateFormater::getDate() << "Unexpected answer from the server." << endl; 00196 } 00197 } 00198 else { 00199 cout << DateFormater::getDate() << "Can't communicate with server." << endl; 00200 } 00201 } 00202 catch ( NetInterfaceException& e ) { 00203 cout << DateFormater::getDate() << "Request connection failed..." << endl; 00204 cout << DateFormater::getDate() << "NetInterface: "; 00205 e.print(); 00206 } 00207 }
|
1.5.1