ZyX wrote:

> Consider the following code:
> 
>     set nocompatible
>     function! Err()
>         try
>             return [
>         catch
>             return 2
>         endtry
>     endfunction
>     echo Err()
> 
> vim launched with «vim -u NONE -S /path/to/file.vim» gives E697 and
> E15 errors, while it should give none.

There is a syntax error in your script.  try/catch is not guaranteed to
catch that kind of errors.

> If you change «return» to «echo», it will just echo 2 without any
> errors.

Looks inconsistent.  Apparently error handling is a bit different for
echo.

> E691 («return ["abc"] =~? '.'») is also not caught, but 

That 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 
> repository.

-- 
hundred-and-one symptoms of being an internet addict:
154. You fondle your mouse.

 /// 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

Raspunde prin e-mail lui