Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Testing behavior of set -e with functions and exit hooks

Language: Layout:
- ] Show input
Absolute running time: 0.19 sec, cpu time: 0.11 sec, memory peak: 3 Mb, absolute service time: 0,2 sec  
edit mode |  history  | discussion
Error(s), warning(s):
+ trap onExit EXIT
+ tf
+ echo tf
+ foo
+ echo foo
+ return 1
+ onExit
+ exitCode=1
+ echo 'onExit: 1'
tf
foo
onExit: 1

    
                
λ
.NET NoSQL database for rapid development