Project

General

Profile

« Previous | Next » 

Revision 8976

lib/util.sh: exceptions: added rethrow, rethrow_subshell aliases

View differences:

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