Project

General

Profile

« Previous | Next » 

Revision 12981

bugfix: lib/sh/util.sh: die(): usage: documented that if msg uses $(...), save_e is needed

View differences:

trunk/lib/sh/util.sh
566 566
	if test ! "$benign_error"; then log_err_hint! "$@"; fi
567 567
}
568 568

  
569
die() # usage: cmd || [type=...] die msg # msg can use $? but not $()
569
die() # usage: if msg uses $(...):    cmd || { save_e; [type=...] die msg; }
570
#              if msg uses only vars: cmd || [type=...] die msg
570 571
{ save_e; kw_params type; "log_${type:-err}" "$1"; rethrow!; }
571 572

  
572 573
die_e() # usage: cmd || [benign_error=1] die_e [|| handle error]

Also available in: Unified diff