David Barnett wrote: > I discovered a bug in try..catch. E117 bypasses the catch and always > bubbles up to the user if it comes from a :return command in code like the > following: > > function E_117_Bad() abort > try > return foo#Bar() > catch /.*/ > endtry > endfunction > > but not if the exception comes from any other command besides return: > > function E_117_Bad() abort > try > let l:foo = foo#Bar() > > return l:foo > > catch /.*/ > endtry > endfunction > > > I tried :call, :echo, and :let, and they all worked as expected. Only > :return is weird.
I can reproduce it. Most likely this is caused by the logic to make the function return even when the exception is caught. -- Lower life forms have more fun! /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.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 --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
