Revision 13209
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sh | ||
---|---|---|
577 | 577 |
log_err_hint() # usage: cmd || [benign_error=1] log_err_hint msg [|| handle err] |
578 | 578 |
# msg only displayed if not benign error |
579 | 579 |
{ |
580 |
kw_params benign_error |
|
580 |
log++ kw_params benign_error
|
|
581 | 581 |
if test ! "$benign_error"; then log_err_hint! "$@"; fi |
582 | 582 |
} |
583 | 583 |
|
... | ... | |
587 | 587 |
|
588 | 588 |
die_e() # usage: cmd || [benign_error=1] die_e [|| handle error] |
589 | 589 |
{ |
590 |
save_e; kw_params benign_error |
|
590 |
save_e; log++ kw_params benign_error
|
|
591 | 591 |
if test "$benign_error"; then log_local; log++; fi |
592 | 592 |
type="${benign_error:+info}" die "command exited with \ |
593 | 593 |
$(if test "$benign_error"; then echo status; else echo error; fi) $e" |
Also available in: Unified diff
lib/sh/util.sh: $benign_error: log at higher log_level because it's logging code