fix named pipe read (unix) & produce core:error event on error in schedule callback & fix editor traceback

This commit is contained in:
MihailRis 2025-08-18 23:32:12 +03:00
parent d32407f1bb
commit 31cd7912ec
3 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@ history = session.get_entry("commands_history")
history_pointer = #history
events.on("core:open_traceback", function()
if modes then
if modes and modes.current ~= 'debug' then
modes:set('debug')
end
end)

View File

@ -31,7 +31,7 @@ local lib = {}
function lib.read(fd, len)
local buffer = FFI.new("uint8_t[?]", len)
local result = C.read(fd, buffer, len)
local result = tonumber(C.read(fd, buffer, len))
local out = Bytearray()

View File

@ -15,8 +15,9 @@ local Schedule = {
local timer = self._timer + dt
for id, interval in pairs(self._intervals) do
if timer - interval.last_called >= interval.delay then
xpcall(interval.callback, function(s)
debug.error(s..'\n'..debug.traceback())
local stack_size = debug.count_frames()
xpcall(interval.callback, function(msg)
__vc__error(msg, 1, 1, stack_size)
end)
interval.last_called = timer
local repetions = interval.repetions