mirror of
https://github.com/neovim/neovim.git
synced 2026-01-03 01:46:31 +10:00
vim-patch:6d211bc: runtime(doc): Improve :catch documentation
fixes: vim/vim#18984
6d211bc4f0
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -2419,12 +2419,15 @@ text...
|
||||
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: >
|
||||
Pattern can start with "Vim({cmd})" to indicate an
|
||||
exception that occurred when executing the Ex command
|
||||
{cmd}. 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(!):/ " catch all errors in :!
|
||||
:catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
|
||||
:catch /my-exception/ " catch user exception
|
||||
:catch /.*/ " catch everything
|
||||
|
||||
Reference in New Issue
Block a user