These two functions ought to behave identically, but don't... For some
reason, the :catch never gets triggered for the Broken one.
function! Working()
try
let y = x
return y
catch /^Vim\%((\a\+)\)\=:E121/
" Handle 'Undefined variable' errors
return 42
endtry
endfunction
function! Broken()
try
return x
catch /^Vim\%((\a\+)\)\=:E121/
" Handle 'Undefined variable' errors
return 42
endtry
endfunction
~Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---