summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-05-19 14:03:32 +1000
committerMaxime Coste <mawww@kakoune.org>2018-05-19 14:15:16 +1000
commitec0f8fe57483e72f45fba995f3e17870e4e30bec (patch)
treeb71bcac104c3565930e894d0530bb7c707f78b75 /doc
parent243cfbc4aeb6bd0cccf185a68e926c225fd14af7 (diff)
Extend `try` command to support multiple catches.
If a catch command fails, and another catch is availabe following it, that following catch gets executed.
Diffstat (limited to 'doc')
-rw-r--r--doc/pages/commands.asciidoc7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc
index 9a86b86d..cd79d26a 100644
--- a/doc/pages/commands.asciidoc
+++ b/doc/pages/commands.asciidoc
@@ -225,10 +225,13 @@ but not really useful in that context.
*-title* <text>:::
set the title of the message box
-*try* <commands> catch <on_error_commands>::
+*try* <commands> [catch <on_error_commands>]...::
prevent an error in *commands* from aborting the whole command
execution, execute *on_error_commands* instead. If nothing is to be
- done on error, the catch part can be omitted
+ done on error, the catch part can be omitted. If an error is raised
+ in the *on_error_commands*, that error is propagated, except if
+ another *catch* and *on_error_commands* parameter follows, in which
+ case those commands get executed, and so-on.
*nop*::
does nothing, but arguments will be evaluated (e.g. shell expansion)