Shane Harper wrote:
> The first example in the help for :try is incorrect:
> :try | edit too much | finally | echo "cleanup" | endtry
> :echo "impossible" " not reached, script terminated above
> "impossible" is now output.
>
> It used to work prior to patch 8.0.1189 on Unix; "edit too much" would have
> caused "E172: Only one file name allowed".
>
> A possible fix is to replace the first line with
> :try | call items("invalid argument") | finally | echo
> "cleanup" | endtry
A bit shorter:
try | call Unknown() | finally | echomsg "cleanup" | endtry
echomsg "not reached"
This uses "echomsg" so that ":messages" shows the output again.
It actually also didn't work until the recent fix for finding the "|".
--
Warning label on a superhero Halloween costume:
"Caution: Cape does not enable user to fly."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202002182033.01IKXXk6008819%40masaka.moolenaar.net.