2023-11-22 05:10:38 +00:00
|
|
|
send_errors_to_output = function(err)
|
|
|
|
local callstack = debug.traceback('', 3)
|
|
|
|
local error_with_callstack = cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
|
2023-12-16 00:18:42 +00:00
|
|
|
table.insert(Current_pane.output_editor_state.lines, {data=''})
|
|
|
|
Current_pane.output_editor_state.cursor1 = {line=#Current_pane.output_editor_state.lines, pos=1}
|
2023-11-22 05:10:38 +00:00
|
|
|
Text.redraw_all(Current_pane.output_editor_state)
|
2023-12-16 00:18:42 +00:00
|
|
|
Text.insert_text(Current_pane.output_editor_state, error_with_callstack)
|
2023-11-22 05:10:38 +00:00
|
|
|
clear_handlers()
|
|
|
|
end
|