Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local file = shell.resolve(assert(args[1], "Must enter a path"))
- local routine = coroutine.create(function()
- xpcall(loadfile(file), function(msg)
- printError(msg)
- for i = 3, 15, 1 do
- local _, err = pcall(error, "", i)
- if err:match("xpcall:") or err == "" then break end
- printError(" ", err)
- end
- end)
- end)
- local filter = nil
- while true do
- local ok, param = coroutine.resume(routine, os.pullEventRaw(filter))
- if ok then
- filter = param
- else
- printError("Could not catch")
- printError(" ", param)
- break
- end
- if coroutine.status(cmd.command) == "dead" then
- print("Exited OK. I think.")
- break
- end
- print("Resume")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement