diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-18 14:34:44 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-18 15:09:18 +0200 |
| commit | 352155889aad57f8cb6d20317ffef81073fb6533 (patch) | |
| tree | ccd267ebb985170c638f3b5ee07fec4c568d1962 | |
| parent | 8696abbe1df9bcc3abe3926a0ea6c9788ae94f58 (diff) | |
| download | vis-352155889aad57f8cb6d20317ffef81073fb6533.tar.gz vis-352155889aad57f8cb6d20317ffef81073fb6533.tar.xz | |
vis-lua: fail more silently when visrc.lua can not be loaded
This prevents opening a separate window to display a full stack
trace and improves usage of a vis binary compiled with lua support
on a system without the necessary *.lua files.
| -rw-r--r-- | vis-lua.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1178,7 +1178,8 @@ void vis_lua_init(Vis *vis) { lua_getglobal(L, "require"); lua_pushstring(L, "visrc"); - pcall(vis, L, 1, 0); + if (lua_pcall(L, 1, 0, 0)) + vis_info_show(vis, "WARNING: failed to load visrc.lua"); } void vis_lua_start(Vis *vis) { |
