diff options
author | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:36:26 +0000 |
---|---|---|
committer | mseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:36:26 +0000 |
commit | dd18b11af7a119be546b9fc654c7c86758985c69 (patch) | |
tree | 6a41e9e2a5ec55fba2929304a7db07fc7badc565 /base/process_util_win.cc | |
parent | 829ad97989a7aac3c80e0a0562e97271cd1e8ea1 (diff) | |
download | chromium_src-dd18b11af7a119be546b9fc654c7c86758985c69.zip chromium_src-dd18b11af7a119be546b9fc654c7c86758985c69.tar.gz chromium_src-dd18b11af7a119be546b9fc654c7c86758985c69.tar.bz2 |
Use LOG_GETLASTERROR in more cases in base/
This provides a more informative textual error rather than a numeric
error code.
BUG=none
TEST=build
Review URL: https://chromiumcodereview.appspot.com/12051083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_win.cc')
-rw-r--r-- | base/process_util_win.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc index 1647af8..4355b15 100644 --- a/base/process_util_win.cc +++ b/base/process_util_win.cc @@ -409,8 +409,7 @@ bool KillProcessById(ProcessId process_id, int exit_code, bool wait) { FALSE, // Don't inherit handle process_id); if (!process) { - DLOG(ERROR) << "Unable to open process " << process_id << " : " - << GetLastError(); + DLOG_GETLASTERROR(ERROR) << "Unable to open process " << process_id; return false; } bool ret = KillProcess(process, exit_code, wait); @@ -493,9 +492,9 @@ bool KillProcess(ProcessHandle process, int exit_code, bool wait) { if (result && wait) { // The process may not end immediately due to pending I/O if (WAIT_OBJECT_0 != WaitForSingleObject(process, 60 * 1000)) - DLOG(ERROR) << "Error waiting for process exit: " << GetLastError(); + DLOG_GETLASTERROR(ERROR) << "Error waiting for process exit"; } else if (!result) { - DLOG(ERROR) << "Unable to terminate process: " << GetLastError(); + DLOG_GETLASTERROR(ERROR) << "Unable to terminate process"; } return result; } |