Re: [BUG] «try .. catch» does not catch some errors in return statement
- ZyX wrote:
> Consider the following code:There is a syntax error in your script. try/catch is not guaranteed to
> set nocompatible
> function! Err()
> return [
> return 2
> echo Err()
> vim launched with «vim -u NONE -S /path/to/file.vim» gives E697 and
> E15 errors, while it should give none.
catch that kind of errors.
> If you change «return» to «echo», it will just echo 2 without anyLooks inconsistent. Apparently error handling is a bit different for
> E691 («return ["abc"] =~? '.'») is also not caught, butThat does look like a bug.
> «return call("Abc", )» was caught successfully. This error was found--
> by «sgp» on vim-use when he tried to catch E691 error instead of
> checking variable type.
> Tested on vim-7.3.102 from Gentoo repos and on vim-7.3.107 from mercurial
hundred-and-one symptoms of being an internet addict:
154. You fondle your mouse.
/// Bram Moolenaar -- Bram@... -- 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