ZyX wrote:
> I noticed that the following code produces no error messages, though thrown
> exception was not caught by any :catch blocks:
> function TestFinallyReturn()
> try
> throw "Test"
> finally
> " Same with :break/:continue in loops and :finally outside of
> " functions
> return 1
> endtry
> endfunction
> call TestFinallyReturn()
> I think this behavior should be documented.
Or we should call it a bug. It's not what you would expect, right?
This gives an error:
while 1
try
NotACommand
finally
echo "finally"
endtry
break
endwhile
But this doesn't:
while 1
try
NotACommand
finally
echo "finally"
break
endtry
endwhile
I think that's a bug.
--
Life would be so much easier if we could just look at the source code.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
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