Try the following script (also attached):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
func! TestPyError()
    echo 'vim-OK1'
    py testPyError()
    echo 'vim-OK2'
endfunct
python << EOF
import vim
def testPyError():
    print 'py-OK1'
    vim.command("echoerr 'py-vim-Error'")
    print 'py-OK2'
EOF
echo TestPyError()
echo 'THE END'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Vim 7.4.052:
    Only vim-OK1 and py-OK1 are printed.
    Python exception vim.error is raised.
Vim 7.3.829:
    Everything is printed, even py-OK2.
    Python exception is not raised.

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.

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.

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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: py_vim_error.vim
Description: Binary data

Raspunde prin e-mail lui