mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
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
3 changed files with 5 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue