On 02/06/11 23:27, Bram Moolenaar wrote:

ZyX wrote:

Is this expected:
     try
         throw 'Throw'
     catch
         echoe 'Echoe'
         echom 'Echom'
     endtry
will show only 'Echoe', but not 'Echom'? I though that «When used
inside a try conditional» refers only to the first section of
`:try...' block, not to `:catch' or `:finally' sections.

This indeed looks wrong.


:echoerr generates an error (which, inside a try block, is handled as an exception). Depending on where the error happens, it may cause an abort of whatever it is that it is wrapped in.

In the present case, the "Echoe" exception is not caught, so it will propagate outside the try block we see here, to be caught by an outside try block if any, or if there isn't, it may (I suppose) propagate as an error, causing an abort of some script or function around this try block.


Best regards,
Tony.
--
Schlattwhapper, n.:
        The window shade that allows itself to be pulled down,
hesitates for a second, then snaps up in your face.
                -- Rich Hall, "Sniglets"

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