> This means in Vim 7.4 Vim script stops after a Vim error occurs in
> Python code. This seems very wrong to me. Vim script writers are used
> to the fact that VimL code execution does not stop after an error
> unless there is a try/catch or when function has "abort" argument.

Code that relies on this is broken. No matter how is some functionality used it 
*can* be put inside try/catch by the user*. I already got a few “nice” to debug 
bugs when was assuming `echoerr` is not breaking execution flaw (note: without 
any traces of python). Now they will be easier to fix: now when I see `echoerr` 
I say I must remove it.

For echoing errors from python there is `sys.stderr`.

Besides, any error shown to user indicates a bug.

*:

- Any command and function can be naturally put inside :try/catch in a script.
- Any mapping can be called with :normal that can be put inside :try/catch.
- Any autocommand can be called either directly with :doau inside :try/catch or 
by putting commands that invoke autocommand inside :try/catch (i.e. :e for 
BufRead*).

There is no way write code that will never stop execution on error without 
using :silent! or :try/catch catching the error on your own. Hence any error 
must be considered to break execution. Any code that considers error not 
breaking execution is broken.

> Also, it means that Vim error handling changes when the user changes
> Python's sys.stderr. I often redirect Python's stdin and stderr to a
> Vim buffer.

I do not see how the above means that. `sys.stderr.write` is similar to 
`echoerr` in VimL (including that writing `sys.stderr` can be transformed into 
VimL exception though without breaking python code) and I did not change that.

I.e. vim error handling did change when the user changes sys.stderr in 
pre-vim-7.4.

> Regards,
> 
> Vlad

-- 
-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui