diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-08 10:34:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-08 11:08:03 +0200 |
commit | 3bc0fc4c4496c345c79734dcd6dc56d44119aebf (patch) | |
tree | d058018aaf35641e461e51c2c20d374fd0d1684c /libbuild2/diagnostics.hxx | |
parent | 84e6c7e62c9d1613af3cad81787b3f277d276140 (diff) |
Make process exit diagnostics consistent
In particular, we now always print error message on non-0 exit except
in cases where such exit is ignored.
Diffstat (limited to 'libbuild2/diagnostics.hxx')
-rw-r--r-- | libbuild2/diagnostics.hxx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx index 9d516be..2505e2d 100644 --- a/libbuild2/diagnostics.hxx +++ b/libbuild2/diagnostics.hxx @@ -623,9 +623,9 @@ namespace build2 // If the child process exited abnormally or normally with non-0 code, // then print the error diagnostics to this effect. Additionally, if the // verbosity level is between 1 and the specified value, then print the - // command line as info after the error. If omit_normall is true, then - // don't print either for the normal exit (usually used when process - // failure can be tolerated). + // command line as info after the error. If omit_normal is true, then + // don't print either for the normal exit (usually used for custom + // diagnostics or when process failure can be tolerated). // // Normally the specified verbosity will be 1 and the command line args // represent the verbosity level 2 (logical) command line. Note that args @@ -637,24 +637,25 @@ namespace build2 // // Note: see also run_finish(diag_buffer&). // - // @@ TODO: need overload with process_env (see print_process). + // @@ TODO: need overload with process_env (see print_process). Also in + // run_finish_impl(). // void close (const cstrings& args, const process_exit& pe, - uint16_t verbosity = 1, - const location& loc = {}, - bool omit_normall = false) + uint16_t verbosity, + bool omit_normal = false, + const location& loc = {}) { - close (args.data (), pe, verbosity, loc, omit_normall); + close (args.data (), pe, verbosity, omit_normal, loc); } void close (const char* const* args, const process_exit& pe, - uint16_t verbosity = 1, - const location& loc = {}, - bool omit_normall = false); + uint16_t verbosity, + bool omit_normal = false, + const location& loc = {}); // As above but with a custom diag record for the child exit diagnostics, // if any. Note that if the diag record has the fail epilogue, then this |