In :h :catch
*:cat* *:catch*
*E603* *E604* *E605* *E654* *E1033*
:cat[ch] [/{pattern}/] The following commands until the next `:catch`,
`:finally`, or `:endtry` that belongs to the same
`:try` as the `:catch` are executed when an exception
matching {pattern} is being thrown and has not yet
been caught by a previous `:catch`. Otherwise, these
commands are skipped.
When {pattern} is omitted all errors are caught.
Examples: >
:catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
:catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
:catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
:catch /^Vim(write):/ " catch all errors in :write
:catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
:catch /my-exception/ " catch user exception
:catch /.*/ " catch everything
:catch " same as /.*/
Those examples which contain \%((\a\+)\)\= can't match Vim(!):E371: .
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()