xolox/vim-lua-ftplugin — Issue #3: luac -p xxx.lua return 1 if there is any errors which cause plugin throw a excpetion.
Author: guotsuan
Created: 2012-03-04 01:22:11+00:00
State: open

Hi,

In my system lua (version 5.1),
if there is any errors in the file. the command "luac -p xxx.lua# exit with code 1.
it will cause the plugin throw an exception and stop the plugin

in os.vim

"try
"Try using my shell.vim plug-in.
"return call('xolox#shell#execute', [a:cmdline, 1] + a:000)
"catch /^Vim\%((\a\+)\)\=:E117/
"Fall back to system() when we get an "unknown function" error.
let output = call('system', [a:cmdline] + a:000)
"if v:shell_error
"throw printf("os.vim %s: Command %s failed: %s", g:xolox#misc#os#vers ion, a:cmdline, xolox#misc#str#trim(output))
"endif
return split(output, "\n")
"endtry

I have to comment the catch setences to let the plugin continue to run.

Thank you