Skip to content

Commit 7e74ccd

Browse files
authored
Merge pull request #45 from jtbx/mangled-error-fix
Fix mangled error message format
2 parents 4749e54 + e8565ee commit 7e74ccd

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/pluginscript_callbacks.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,7 @@ local function print_coroutine_error(co, err, msg_prefix)
5454
if not filename then
5555
filename, line, err_msg = '?', -1, err
5656
end
57-
local msg_lines = {
58-
(msg_prefix or '') .. debug_traceback(co, err_msg, 1),
59-
}
60-
for i = #lps_callstack, 1, -1 do
61-
table_insert(msg_lines, table_concat(lps_callstack[i], ' '))
62-
end
63-
local msg = table_concat(msg_lines, '\n\tin ')
64-
api.godot_print_error(msg, debug_getinfo(co, 0, 'n').name, filename, tonumber(line))
57+
api.godot_print_error((msg_prefix or filename .. ':' .. line .. ': ') .. err_msg, debug_getinfo(co, 0, 'n').name, filename, tonumber(line))
6558
end
6659

6760
local function wrap_callback(f, error_return)

0 commit comments

Comments
 (0)