Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** WARNING: UNTESTED CODE ***
- do
- local errorLog = io.open(system.pathForFile("error.log", DocumentsDirectory), 'w')
- if errorLog then
- local function recordLine(event, line)
- errorLog:write(debug.getinfo(2).source, ": ", line, '\n')
- errorLog:flush()
- end
- debug.sethook(recordLine, 'l')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement