Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _, err = pcall(function() parallel.waitForAny(function() main(args) end, monitorKeyboardShortcuts) end)
- -- Catch errors
- if err and not err:find("Terminated") then
- term.setCursorBlink(false)
- title("LuaIDE - Crash! D:")
- gpu.setBackground(theme.err)
- for i = 6, 8 do
- term.setCursor(5, i)
- term.write(string.rep(" ", 36))
- end
- term.setCursor(6, 7)
- term.write("LuaIDE Has Crashed! D:")
- gpu.setBackground(theme.background)
- term.setCursor(2, 10)
- print(err)
- gpu.setBackground(theme.prompt)
- local _, cy = term.getCursor()
- for i = cy + 1, cy + 4 do
- term.setCursor(5, i)
- term.write(string.rep(" ", 36))
- end
- term.setCursor(6, cy + 2)
- term.write("Please report this error to")
- term.setCursor(6, cy + 3)
- term.write("GravityScore! ")
- gpu.setBackground(theme.background)
- if isAdvanced() then
- centerPrint("Click to Exit...", h - 1)
- else
- centerPrint("Press Any Key to Exit...", h - 1)
- end
- while true do
- local e = os.pullEvent()
- if e == "mouse_click" or (not isAdvanced() and e == "key") then
- break
- end
- end
- -- Prevent key from being shown
- os.queueEvent(event_distract)
- os.pullEvent()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement