On Jul 21, 11:44 am, Ben Fritz <[email protected]> wrote:
> I tried this:
>
> function! Ech() abort
>   let g:var = 0
>   echoerr "Die die die!"
>   let g:var = 99
> endfu
>
> but after running the function, g:var is equal to 99. What gives?
> Apparently an "error message" (:help :echoerr) doesn't count as "an
> error is detected"?
>
> Using :throw works, but the error message looks pretty bad:
>
> function! Ech()
>   let g:var = 0
>   throw "Die die die!"
>   let g:var = 99
> endfu

I'd still like an answer to the above, but I just
found :help :return...I think that's what the OP wants.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to