On Wednesday, November 28, 2012 4:18:41 PM UTC-6, Techlive Zheng wrote:
> 
> What I want accomplish is something like a error listener, if certain
> 
> type of error raises, then the defined action will be triggerd. The
> 
> end user do not need to care about using `try...catch` in their
> 
> command, they just fire up any command they want, and let script
> 
> handle the rest.

This is a much better explanation of what you wanted. Unfortunately I cannot 
think of any way to accomplish what you want. What are you trying to accomplish 
with your script? I.e. what task are you trying to do that you think you need a 
global always-active error listener?

> This is easy for script-defined command, but how to
> 
> catch a error that a system command raises?

The way to catch errors is with try...catch. I'm not sure how a script defined 
command makes this any easier to do, unless you mean the script defined command 
can do try...catch internally.

By the way, this question is about using Vim, not developing the Vim code, so 
questions like it would be better asked on vim_use.

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