Project

General

Profile

« Previous | Next » 

Revision 9032

lib/sh/util.sh: added save_e, which now sets $e just locally

View differences:

util.sh
45 45

  
46 46
#### exceptions
47 47

  
48
# usage: cmd || { export_e; ...; rethrow; }
48
# usage: cmd || { save_e; ...; rethrow; }
49 49
alias export_e='e=$?'
50
alias save_e='declare e=$?'
50 51
alias rethrow='return "$e"'
51 52
alias rethrow_subshell='exit "$e"'
52 53

  

Also available in: Unified diff