0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

Better error message if CreateService() fails.

This commit is contained in:
Justin Dearing 2010-07-06 04:42:18 +08:00 committed by Eliot
parent 94053aebc8
commit e486468edc

View File

@ -89,7 +89,8 @@ namespace mongo {
SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
commandLineWide.str().c_str(), NULL, NULL, L"\0\0", NULL, NULL );
if ( schService == NULL ) {
log() << "Error creating service." << endl;
DWORD err = ::GetLastError();
log() << "Error creating service: " << GetWinErrMsg(err) << endl;
::CloseServiceHandle( schSCManager );
return false;
}