blob: 20bf351551c31f515199385acfb915c236237331 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
" MNV :catch command
" :help :catch
catch /^MNV:Interrupt$/ " catch interrupts (CTRL-C)
catch /^MNV\%((\a\+)\)\=:E/ " catch all MNV errors
catch /^MNV\%((\a\+)\)\=:/ " catch errors and interrupts
catch /^MNV(write):/ " catch all errors in :write
catch /^MNV\%((\a\+)\)\=:E123:/ " catch error E123
catch /my-exception/ " catch user exception
catch /.*/ " catch everything
catch " same as /.*/
" :help :try
try | sleep 100 | catch /^MNV:Interrupt$/ | endtry
try | edit | catch /^MNV(edit):E\d\+/ | echo "error" | endtry
|