Revision 9437
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/sh/util.sh | ||
---|---|---|
284 | 284 |
die() # usage: cmd || [type=...] die msg |
285 | 285 |
{ save_e; kw_params type; "log_${type:-err}" "$1"; rethrow; } |
286 | 286 |
|
287 |
die_e() { save_e; log_e; rethrow; } # usage: cmd || die_e [|| handle error] |
|
287 | 288 |
|
289 |
|
|
288 | 290 |
#### functions |
289 | 291 |
|
290 | 292 |
func_exists() { declare -f "$1" >/dev/null; } |
Also available in: Unified diff
lib/sh/util.sh: added die_e(), which logs that a command exited with an error