Ensure error and stack trace are written to stdout

To address https://github.com/franko/lite-xl/issues/87
This commit is contained in:
Francesco Abbate committed 2021-03-07 09:48:44 +01:00
1 parent 199476547b
commit 23a053e1ee
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -879,7 +879,7 @@ function core.on_error(err)
-- write error to file
local fp = io.open(USERDIR .. "/error.txt", "wb")
fp:write("Error: " .. tostring(err) .. "\n")
fp:write(debug.traceback(nil, 4))
fp:write(debug.traceback(nil, 4) .. "\n")
fp:close()
-- save copy of all unsaved documents
for _, doc in ipairs(core.docs) do