Advertisement
Guest User

Untitled

a guest
Feb 20th, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. local _, err = pcall(function() parallel.waitForAny(function() main(args) end, monitorKeyboardShortcuts) end)
  2.  
  3. -- Catch errors
  4. if err and not err:find("Terminated") then
  5. term.setCursorBlink(false)
  6. title("LuaIDE - Crash! D:")
  7. gpu.setBackground(theme.err)
  8. for i = 6, 8 do
  9. term.setCursor(5, i)
  10. term.write(string.rep(" ", 36))
  11. end
  12. term.setCursor(6, 7)
  13. term.write("LuaIDE Has Crashed! D:")
  14. gpu.setBackground(theme.background)
  15. term.setCursor(2, 10)
  16. print(err)
  17. gpu.setBackground(theme.prompt)
  18. local _, cy = term.getCursor()
  19. for i = cy + 1, cy + 4 do
  20. term.setCursor(5, i)
  21. term.write(string.rep(" ", 36))
  22. end
  23. term.setCursor(6, cy + 2)
  24. term.write("Please report this error to")
  25. term.setCursor(6, cy + 3)
  26. term.write("GravityScore! ")
  27. gpu.setBackground(theme.background)
  28. if isAdvanced() then
  29. centerPrint("Click to Exit...", h - 1)
  30. else
  31. centerPrint("Press Any Key to Exit...", h - 1)
  32. end
  33. while true do
  34. local e = os.pullEvent()
  35. if e == "mouse_click" or (not isAdvanced() and e == "key") then
  36. break
  37. end
  38. end
  39.  
  40. -- Prevent key from being shown
  41. os.queueEvent(event_distract)
  42. os.pullEvent()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement