Fix problem with fatal error message
Previous implementation was broken. Ensure the error file is always written and write its location in the error message
This commit is contained in:
+1
-1
@@ -877,7 +877,7 @@ end
|
||||
|
||||
function core.on_error(err)
|
||||
-- write error to file
|
||||
local fp = io.open(EXEDIR .. "/error.txt", "wb")
|
||||
local fp = io.open(USERDIR .. "/error.txt", "wb")
|
||||
fp:write("Error: " .. tostring(err) .. "\n")
|
||||
fp:write(debug.traceback(nil, 4))
|
||||
fp:close()
|
||||
|
||||
Reference in New Issue
Block a user