Realign Catch examples - unequal tabs and spaces

This commit is contained in:
Igor Irianto 2021-02-10 09:28:34 -06:00 committed by GitHub
parent 6604ba8064
commit 54d19b99f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -476,17 +476,17 @@ The difference between `catch` and `finally` is that `finally` is always run, er
You can catch specific error with `:catch`. According to `:h :catch`:
```
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: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 /.*/
catch /my-exception/. " catch user exception
catch /.*/ " catch everything
catch. " same as /.*/
```
If you notice from the list above, there is a catch for interrupt. Inside a `try` block, an interrupt is considered a catchable error.
Inside a `try` block, an interrupt is considered a catchable error.
```
try