better err msg
This commit is contained in:
@@ -261,7 +261,6 @@ namespace mongo {
|
||||
pid_t pid() const { return pid_; }
|
||||
|
||||
boost::filesystem::path find(string prog) {
|
||||
cout << "ELIOT [" << prog << "]" << endl;
|
||||
boost::filesystem::path p = prog;
|
||||
#ifdef _WIN32
|
||||
p = change_extension(p, ".exe");
|
||||
@@ -291,9 +290,7 @@ namespace mongo {
|
||||
boost::filesystem::path t = boost::filesystem::initial_path() / p;
|
||||
if( boost::filesystem::exists(t) ) return t;
|
||||
}
|
||||
// this breaks system programs
|
||||
// massert( 10435, (string)"run: couldn't find " + prog , false );
|
||||
return p;
|
||||
return p; // not found; might find via system path
|
||||
}
|
||||
|
||||
ProgramRunner( const BSONObj &args , bool isMongoProgram=true)
|
||||
@@ -445,7 +442,11 @@ namespace mongo {
|
||||
ZeroMemory(&pi, sizeof(pi));
|
||||
|
||||
bool success = CreateProcess( NULL, args_tchar.get(), NULL, NULL, true, 0, NULL, NULL, &si, &pi) != 0;
|
||||
uassert(13294, "couldn't start process", success);
|
||||
{
|
||||
stringstream ss;
|
||||
ss << "couldn't start process " << argv_[0];
|
||||
uassert(13294, ss.str(), success);
|
||||
}
|
||||
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
@@ -475,7 +476,7 @@ namespace mongo {
|
||||
|
||||
execvp( argv[ 0 ], const_cast<char**>(argv) );
|
||||
|
||||
cout << "Unable to start program: " << errnoWithDescription() << endl;
|
||||
cout << "Unable to start program " << argv[0] << ' ' << errnoWithDescription() << endl;
|
||||
::_Exit(-1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user