diff options
author | ccalvarin <ccalvarin@google.com> | 2018-04-06 12:42:09 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-06 12:44:01 -0700 |
commit | 8448f57b2a0119b1fde1e93545f01dcbb696459d (patch) | |
tree | f7bb68b1523f5daa301fd9cd6f0f44784d2f733d /src/main/cpp/blaze_util_freebsd.cc | |
parent | e4c64ac6fe63d78da3a8cafe1df72c81df23fcb0 (diff) |
Remove die() and replace it with BAZEL_DIE, part of the logging framework.
This will mean the messages will make it to the right output stream.
RELNOTES:
PiperOrigin-RevId: 191925662
Diffstat (limited to 'src/main/cpp/blaze_util_freebsd.cc')
-rw-r--r-- | src/main/cpp/blaze_util_freebsd.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/cpp/blaze_util_freebsd.cc b/src/main/cpp/blaze_util_freebsd.cc index e105e37ff3..4b27b4287d 100644 --- a/src/main/cpp/blaze_util_freebsd.cc +++ b/src/main/cpp/blaze_util_freebsd.cc @@ -38,7 +38,6 @@ namespace blaze { -using blaze_util::die; using blaze_util::GetLastErrorString; using std::string; @@ -79,14 +78,14 @@ string GetSelfPath() { auto p = procstat_getprocs(procstat, KERN_PROC_PID, pid, &n); if (p) { if (n != 1) { - die(blaze_exit_code::INTERNAL_ERROR, - "expected exactly one process from procstat_getprocs, got %d: %s", n, - GetLastErrorString().c_str()); + BAZEL_DIE(blaze_exit_code::INTERNAL_ERROR) + << "expected exactly one process from procstat_getprocs, got " << n + << ": " << GetLastErrorString(); } auto r = procstat_getpathname(procstat, p, buffer, PATH_MAX); if (r != 0) { - die(blaze_exit_code::INTERNAL_ERROR, "procstat_getpathname failed: %s", - GetLastErrorString().c_str()); + BAZEL_DIE(blaze_exit_code::INTERNAL_ERROR) + << "procstat_getpathname failed: " << GetLastErrorString(); } procstat_freeprocs(procstat, p); } @@ -118,9 +117,9 @@ string GetProcessCWD(int pid) { string cwd; if (p) { if (n != 1) { - die(blaze_exit_code::INTERNAL_ERROR, - "expected exactly one process from procstat_getprocs, got %d: %s", n, - GetLastErrorString().c_str()); + BAZEL_DIE(blaze_exit_code::INTERNAL_ERROR) + << "expected exactly one process from procstat_getprocs, got " << n + << ": " << GetLastErrorString(); } auto files = procstat_getfiles(procstat, p, false); filestat *entry; |