Better error handling

Regrettably, it requires a fairly recent version of Vim.