Skip to content

Commit cc68846

Browse files
committed
Fix mangled error message format
1 parent 6308dc2 commit cc68846

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pluginscript_callbacks.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ local function print_coroutine_error(co, err, msg_prefix)
6161
table_insert(msg_lines, table_concat(lps_callstack[i], ' '))
6262
end
6363
local msg = table_concat(msg_lines, '\n\tin ')
64-
api.godot_print_error(msg, debug_getinfo(co, 0, 'n').name, filename, tonumber(line))
64+
api.godot_print_error(
65+
("%s:%d: %s"):format(filename, tonumber(line), msg:match("[%w%p%s]-%c"):gsub('%c', '', 1)), debug_getinfo(co, 0, 'n').name, filename, tonumber(line)
66+
)
6567
end
6668

6769
local function wrap_callback(f, error_return)

0 commit comments

Comments
 (0)