diff options
-rw-r--r-- | server/src/log.lua | 1 | ||||
-rw-r--r-- | server/src/timer.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/server/src/log.lua b/server/src/log.lua index 043ec43a..af4212e1 100644 --- a/server/src/log.lua +++ b/server/src/log.lua @@ -43,6 +43,7 @@ local function push_log(level, ...) local str = table.concat(t, '\t', 1, t.n) if level == 'error' then str = str .. '\n' .. debug.traceback(nil, 3) + io.stderr:write(str .. '\n') end init_log_file() if not log.file then diff --git a/server/src/timer.lua b/server/src/timer.lua index f477dccf..dc36e6a0 100644 --- a/server/src/timer.lua +++ b/server/src/timer.lua @@ -42,7 +42,7 @@ local function mWakeup(self) end self._running = false if self._onTimer then - self:_onTimer() + xpcall(self._onTimer, log.error, self) end if self._removed then return |