Matt Wozniski wrote:
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
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