diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-17 09:13:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-17 09:13:12 +0200 |
commit | 4922e33ba25a7bb3f00e28ad7f5ae8754c403112 (patch) | |
tree | 6144e1aad2ae6d09d5b73c6ac1c772a04e9cef74 /bbot/worker/worker.cxx | |
parent | b5bcfa655986310f70755551b12fb259ad91d774 (diff) |
Convert to using operator<<(ostream,process_exit)
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r-- | bbot/worker/worker.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 3579f36..a8e0f6d 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -162,17 +162,9 @@ run_cmd (tracer& t, const process_exit& e (*pr.exit); - if (e.normal ()) - { - add (name + " exited with code " + to_string (e.code ())); - return result_status::error; - } - else - { - add (name + " terminated abnormally: " + e.description () + - (e.core () ? " (core dumped)" : "")); - return result_status::abnormal; - } + add (name + " " + to_string (e)); + + return e.normal () ? result_status::error : result_status::abnormal; } catch (const process_error& e) { |