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)
|
2024-01-01 06:51:04 +00:00
|
|
|
table.insert(Output_editor_state.lines, {data=''})
|
|
|
|
Output_editor_state.cursor1 = {line=#Output_editor_state.lines, pos=1}
|
|
|
|
Text.redraw_all(Output_editor_state)
|
|
|
|
Text.insert_text(Output_editor_state, error_with_callstack)
|
2024-01-01 05:45:12 +00:00
|
|
|
stop_app()
|
2023-11-22 05:10:38 +00:00
|
|
|
end
|