don't print out old getLastError on client error SERVER-852

This commit is contained in:
Eliot Horowitz
2010-03-30 13:48:47 -04:00
parent 1112908491
commit 67d7d7936b

View File

@@ -510,8 +510,8 @@ int _main(int argc, char* argv[]) {
if ( ! wascmd ){
try {
scope->exec( code.c_str() , "(shell)" , false , true , false );
scope->exec( "shellPrintHelper( __lastres__ );" , "(shell2)" , true , true , false );
if ( scope->exec( code.c_str() , "(shell)" , false , true , false ) )
scope->exec( "shellPrintHelper( __lastres__ );" , "(shell2)" , true , true , false );
}
catch ( std::exception& e ){
cout << "error:" << e.what() << endl;