cout is bad

This commit is contained in:
Eliot Horowitz
2010-05-26 00:32:39 -04:00
parent 9f3c0fcf09
commit 39f1354781

View File

@@ -470,7 +470,7 @@ namespace mongo {
JSFunction * func = JS_CompileFunction( _context , assoc , fname.str().c_str() , params.size() , paramArray.get() , code.c_str() , strlen( code.c_str() ) , "nofile_b" , 0 );
if ( ! func ){
cout << "compile failed for: " << raw << endl;
log() << "compile failed for: " << raw << endl;
return 0;
}
gcName = "cf normal";
@@ -503,10 +503,10 @@ namespace mongo {
free( dst );
if ( ! res ){
cout << "decode failed. probably invalid utf-8 string [" << c << "]" << endl;
log() << "decode failed. probably invalid utf-8 string [" << c << "]" << endl;
jsval v;
if ( JS_GetPendingException( _context , &v ) )
cout << "\t why: " << toString( v ) << endl;
log() << "\t why: " << toString( v ) << endl;
throw InvalidUTF8Exception();
}
@@ -669,7 +669,7 @@ namespace mongo {
}
}
cout << "toval: unknown type: " << e.type() << endl;
log() << "toval: unknown type: " << (int)(e.type()) << endl;
uassert( 10218 , "not done: toval" , 0 );
return 0;
}