summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2022-01-06 09:26:22 -0600
committercheapie <no-email-for-you@example.com>2022-01-06 09:26:22 -0600
commite8998e0fab52ea825596a741f2650ad8e1e95d72 (patch)
tree5998c7ad39a24cddb511dd8602dff22efafd5eb5
parent243a8063ddbb107ab191aa333cc6cdc85701f410 (diff)
downloadmesecons-e8998e0fab52ea825596a741f2650ad8e1e95d72.tar
mesecons-e8998e0fab52ea825596a741f2650ad8e1e95d72.tar.gz
mesecons-e8998e0fab52ea825596a741f2650ad8e1e95d72.tar.bz2
mesecons-e8998e0fab52ea825596a741f2650ad8e1e95d72.tar.xz
mesecons-e8998e0fab52ea825596a741f2650ad8e1e95d72.zip
Avoid crashing on a nil error message
-rw-r--r--mesecons_luacontroller/init.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 500bbbd..4b7d43b 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -827,6 +827,7 @@ local function run(pos, event)
local code = meta:get_string("code")
local ok, errmsg = run_inner(pos, code, event)
if not ok then
+ if not errmsg then errmsg = "(unknown error)" end
terminal_write(pos,"[ERROR] "..errmsg)
reset_meta(pos, code, errmsg)
else