Revision 8976
Added by Aaron Marcuse-Kubitza about 11 years ago
lib/util.sh | ||
---|---|---|
30 | 30 |
|
31 | 31 |
#### exceptions |
32 | 32 |
|
33 |
alias rethrow='return "$e"' |
|
34 |
alias rethrow_subshell='exit "$e"' |
|
35 |
|
|
33 | 36 |
# usage: try cmd...; ignore status; if catch status; then ...; fi; end_try |
34 | 37 |
|
35 | 38 |
try_ () { { "$@"; e=$?;} || true; } |
Also available in: Unified diff
lib/util.sh: exceptions: added rethrow, rethrow_subshell aliases