fix named pipe read (unix) & produce core:error event on error in schedule callback & fix editor traceback
This commit is contained in:
parent
d32407f1bb
commit
31cd7912ec
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user